Skip to content

Instantly share code, notes, and snippets.

View dky's full-sized avatar
馃崪

dky

馃崪
View GitHub Profile
@dky
dky / gist:6055694
Last active December 20, 2015 02:19
Basic packer template
{
"builders": [
{
"type": "vmware",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
],
"boot_wait": "5s",
"disk_size": 10480,
"guest_os_type": "rhel6-64",
@dky
dky / gist:6055403
Created July 22, 2013 16:41
Packer up command
packer build template.json
@dky
dky / gist:5749086
Created June 10, 2013 14:25
List local fs type Solaris
[root@localhost /mnt]# df -n
/ : zfs
/devices : devfs
/system/contract : ctfs
/proc : proc
/etc/mnttab : mntfs
/etc/svc/volatile : tmpfs
/system/object : objfs
/etc/dfs/sharetab : sharefs
/platform/sun4u-us3/lib/libc_psr.so.1: lofs
@dky
dky / gist:5711505
Created June 5, 2013 03:56
List loaded vim plugins
:scriptnames
@dky
dky / gist:5711494
Created June 5, 2013 03:54
vim_plugin list
1: ~/.vimrc
2: ~/.dotfiles/.vim/autoload/pathogen.vim
3: /usr/local/Cellar/vim/7.3.827/share/vim/vim73/colors/desert.vim
4: /usr/local/Cellar/vim/7.3.827/share/vim/vim73/syntax/syntax.vim
5: /usr/local/Cellar/vim/7.3.827/share/vim/vim73/syntax/synload.vim
6: /usr/local/Cellar/vim/7.3.827/share/vim/vim73/syntax/syncolor.vim
7: /usr/local/Cellar/vim/7.3.827/share/vim/vim73/filetype.vim
8: ~/.dotfiles/.vim/bundle/SingleCompile/plugin/SingleCompile.vim
9: ~/.dotfiles/.vim/bundle/gist-vim/plugin/gist.vim
10: ~/.dotfiles/.vim/bundle/nerdtree/plugin/NERD_tree.vim
@dky
dky / gist:5565643
Created May 13, 2013 01:31
Vagrant SSH public key
su - vagrant
mkdir .ssh
cd .ssh
wget -O authorized_keys http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub
chmod 600 authorized_keys
@dky
dky / gist:5549104
Created May 9, 2013 17:34
For loop to remove unnecessary firmware packages.
for i in `rpm -qa |grep -i firmware`; do rpm -e $i; done
@dky
dky / gist:5543015
Created May 8, 2013 19:35
Delete mac address and network manager parameters from ifcfg-eth0
sed -i.backup '/HWADDR=/d' /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i.backup '/NM_CONTROLLED/d' /etc/sysconfig/network-scripts/ifcfg-eth0
@dky
dky / gist:5542960
Created May 8, 2013 19:28
Delete persistent mac address Red Hat.
sed -i.backup 's/ATTR{address}=="..:..:..:..:..:..",//' /etc/udev/rules.d/70-persistent-net.rules
@dky
dky / gist:5542837
Created May 8, 2013 19:12
Append to vagrant all no password after root in sudoers
sed -i.backup "/root\s*ALL=(ALL)/ a\vagrant ALL=NOPASSWD:ALL" /etc/sudoers