This file contains hidden or 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 hidden or 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 hidden or 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
SCRIPTPATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) |
This file contains hidden or 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
openssl genrsa -out server.key 2048 | |
openssl req -new -key server.key -out server.csr | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |