Skip to content

Instantly share code, notes, and snippets.

@DRN88
DRN88 / vmware-vsphere-cli-centos7.sh
Created August 9, 2016 14:14
vmware-vsphere-cli-centos7.sh
#!/bin/bash
# Install required packages
yum makecache all
yum -y install openssl-devel cpan perl-Devel-StackTrace perl-Class-Data-Inheritable perl-Convert-ASN1 perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-X509 perl-Exception-Class perl-Archive-Zip perl-Path-Class perl-Try-Tiny perl-Crypt-SSLeay perl-Class-MethodMaker perl-Data-UUID perl-Data-Dump perl-SOAP-Lite perl-XML-SAX perl-XML-NamespaceSupport perl-libxml-perl perl-XML-LibXML perl-Socket6 perl-IO-Socket-INET6 perl-Net-INET6Glue
# Install perl modules with specific version
PERL_MM_USE_DEFAULT=1 cpan install BINGOS/ExtUtils-MakeMaker-6.96.tar.gz LEONT/Module-Build-0.4205.tar.gz GBARR/libnet-1.22.tar.gz GAAS/libwww-perl-5.837.tar.gz PERLER/UUID-Random-0.04.tar.gz
# Unattended vspherecli install
@wizioo
wizioo / gitignore_per_git_branch.md
Last active August 22, 2024 11:25
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@jsqwang
jsqwang / swap.sh
Last active August 29, 2015 14:23
#If you want to learn how to create the file faster, remove the file and follow along below:
sudo rm /swapfile
#The Faster Way
#The quicker way of getting the same file is by using the fallocate program. This command creates a file of a preallocated size #instantly, without actually having to write dummy contents.
#We can create a 4 Gigabyte file by typing:
@jbenner-radham
jbenner-radham / pricing-ec2-vs-digitalocean.md
Last active December 5, 2018 18:31
Pricing comparison for Amazon AWS EC2 vs. Digital Ocean

Amazon EC2 and DigitalOcean Comparison

              | EC2 Small (previous gen) | Digital Ocean 2GB

-----------------|--------------------------|------------------ Hourly Price | $0.044 | $0.03 Monthy Price | $32 | $20 RAM | 1.7GB | 2GB HDD | 160GB | 40GB (SDD) CPU | x1 | x2 Monthy Transfer | 1GB | 3TB

@KartikTalwar
KartikTalwar / Documentation.md
Last active August 11, 2024 01:52
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs