Skip to content

Instantly share code, notes, and snippets.

View dky's full-sized avatar
馃崪

dky

馃崪
View GitHub Profile
@dky
dky / gist:4443690
Last active November 16, 2019 21:02
Perl one liner to convert epoch time to human readable
perl -pe 's/([\d.]+)/localtime $1/e;'
@dky
dky / gist:4445940
Created January 3, 2013 18:54
SSH backup to remote destination
( cd / ; tar -cvf - / ) | ssh user@backuphost 'cat > hostname_`date -I`.tar'
@dky
dky / gist:4447505
Created January 3, 2013 21:33
Solaris check OBP version from OS
/usr/platform/`uname -m`/sbin/prtdiag -v
@dky
dky / gist:4447822
Last active December 10, 2015 14:29
Check if WAN boot is available on sun servers. Run this when the system is up.
eeprom | grep network-boot-arguments
@dky
dky / gist:4447860
Created January 3, 2013 22:13
Check version of ALOM on Solaris servers. Run from OS.
/usr/platform/`uname -i`/sbin/scadm version -v
@dky
dky / gist:4450093
Created January 4, 2013 05:03
Change the admin username on a Wordpress install
UPDATE wp_users SET user_login = 'notadmin' WHERE user_login = 'admin';
@dky
dky / gist:4450098
Created January 4, 2013 05:04
Verify that the user account is set to default "admin" in Wordpress
select * FROM wp_sitemeta where meta_value = 'a:1:{i:0;s:5:"admin";}';
@dky
dky / gist:4455026
Created January 4, 2013 19:01
SUNWjet copy install media.
/opt/SUNWjet/bin/copy_solaris_media -d /export/install/sol_10_811_sparc -n sol_10_811_sparc /cdrom/sol_10_811_sparc
@dky
dky / gist:4455043
Last active December 10, 2015 15:28
Kick start boot parameters for network with no DHCP. We are statically assigning IP address.
linux ks=https://yourksserver/ks/yourkickstart.ks ksdevice=eth0 ip=192.168.x.x gateway=192.168.x.x netmask=255.255.255.0
@dky
dky / gist:4455291
Created January 4, 2013 19:40
SUNWjet Looking up the existing Solaris versions
/opt/SUNWjet/bin/list_solaris_locations