This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git checkout -b <NEW_NAME_FOR_MASTER> | |
git symbolic-ref HEAD refs/heads/<NEW_NAME_FOR_MASTER> | |
git branch -D master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $cmd_base = "..."; | |
my @cmd_opts = qw( | |
... | |
); | |
my $cmd_args = "..."; | |
my $cmd = join(" ", $cmd_base, @cmd_opts, $cmd_args); | |
my $ph; | |
open($ph, "$cmd |") or do { | |
warn("Can not run command $cmd due to: $!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Put your reset styles here */ | |
/* Put styles for desktop and basic styles for all devices here */ | |
body { | |
/* properties for body here */ | |
} | |
/* medium display only */ | |
@media (min-width: 481px) and (max-width:768px) { | |
body { | |
/* properties that only apply to tablets */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect insecure http request from outside of internal network to https | |
RewriteEngine on | |
RewriteCond %{HTTPS} !^on$ [NC] | |
RewriteCond %{REMOTE_HOST} !^100\.2\.[0-9]+\.[0-9]+$ | |
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Perl onliner is used to delete selected commits from the git rebase -i commit text | |
# The range of commits includes extra commit to prevent git from doing noop when | |
# all commits after certain point are to be backed out. | |
# Some notes on the Perl onliner: | |
# -n: run the script as specified by -e in the while(<>) loop | |
# -i: modify the file inplace | |
# -e: command to run | |
env GIT_SEQUENCE_EDITOR="perl -ni -e 'print unless /^pick (7d105ae|08fe503|97bf990)/'" git rebase -i <earliest_commit_to_backout>^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRC=/mnt/data/src1 | |
TRG=/mnt/data/trg1 | |
IFS=$'\n' | |
for f in $(ls -1 $SRC) | |
do | |
if [[ -d $TRG/$f || -f $TRG/$f ]]; then | |
echo "$f already exists!" | |
else | |
echo "Moving $f..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diskutil list | |
diskutil unmountDisk /dev/<disk# from diskutil> | |
sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH in as root, by default you’re in /storage; switch to root partition: | |
$ cd / | |
Keep XBMC from restarting: | |
$ touch /var/lock/xbmc.disabled | |
Stop XBMC, so we can unmount /storage: | |
$ killall -9 xbmc.bin | |
$ umount /storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OpenEdge/Fathom Replication can be disabled offline by running the following: | |
# For the sourcedb: | |
proutil source_db_name -C DisableSiteReplication source | |
# For the targetdb: | |
proutil target_db_name -C DisableSiteReplication target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The .css and image files required by CGit should be copied to /var/www/cgit-css | |
# as nginx concat the matched URI with the document root which is very different | |
# from Apache's Alias directive. | |
location /cgit-css { | |
root /var/www; | |
index index.html index.htm; | |
} | |
# The cgit.cgi program does not work if the whole URI is passed as PATH_INFO. | |
# Strip the CGI program name from URI and set PATH_INFO to the remaining part, |
OlderNewer