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 -MExtUtils::Installed -e 'my $Inst = ExtUtils::Installed->new();my @Modules = $Inst->modules(); for my $module (@Modules) { print "$module " . $Inst->version($module) . "\n"; } ' |
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
#!/bin/bash | |
########################## | |
## Check if run as root ## | |
########################## | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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
NSOperatingSystemVersion ios8_1_0 = (NSOperatingSystemVersion){8, 1, 0}; | |
if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:ios8_1_0]) { | |
// Read and write workout information to health kit. | |
} else { | |
// Write workout information to health kit | |
} |
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
openssl pkcs12 -nocerts -out aps_private-key.pem -in aps_private-key.p12 | |
openssl x509 -in aps_development.cer -inform der -out aps_development.pem | |
openssl pkcs12 -export -in aps_development.pem -out aps_dev_credentials.p12 -inkey aps_private-key.pem |
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 clone https://github.com/tesseract-ocr/tesseract.git | |
cd tesseract/ | |
pkgin in autoconf automake libtool | |
wget "http://www.leptonica.com/source/leptonica-1.72.tar.gz" | |
cd leptonica-1.72 | |
CFLAGS="-D__SOLARIS__" | |
./configure --prefix=/opt/local | |
make && make install | |
cd .. | |
export LIBLEPT_HEADERSDIR=/tmp/tesseract/leptonica-1.72/src |
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
svcadm enable ndp | |
ifconfig bge0 inet6 plumb | |
ifconfig bge0 inet6 addif 2607:f128:0421:0081:0732:0003:1208:3300/64 up | |
route add -inet6 2607:f128:0421:0081::1 2607:f128:0421:0081:0732:0003:1208:3300 -interface | |
route add -inet6 default 2607:f128:0421:0081::1 | |
dladm create-bridge six | |
dladm create-etherstub stub2 | |
dladm set-linkprop -p mtu=1500 stub2 |
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
let avUrlAsset = AVAsset(URL: _url) | |
let duration = avUrlAsset.duration | |
let durationInSeconds = CMTimeGetSeconds(duration) | |
let item = AVPlayerItem(asset: avUrlAsset, automaticallyLoadedAssetKeys:["duration"]) | |
let params = AVMutableAudioMixInputParameters(track: avUrlAsset.tracks.first! as AVAssetTrack) | |
let firstSecond = CMTimeRangeMake(CMTimeMakeWithSeconds(0, 1), CMTimeMakeWithSeconds(15, 1)) | |
let lastSecond = CMTimeRangeMake(CMTimeMakeWithSeconds(durationInSeconds - 1, 1), CMTimeMakeWithSeconds(1, 1)) | |
params.setVolumeRampFromStartVolume(0, toEndVolume: 1, timeRange: firstSecond) | |
params.setVolumeRampFromStartVolume(1, toEndVolume: 0, timeRange: lastSecond) | |
let mix = AVMutableAudioMix() |
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
export DISPLAY=:10 | |
Xvfb :10 -screen 0 5120x2880x24 -ac & | |
google-chrome --start-maximized --remote-debugging-port=9222 & | |
cd /usr/local/bin | |
nohup java -jar ./selenium-server-standalone-2.50.1.jar & |
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
ps -O etimes -eo pid,etime,comm,user,tty | grep chrome | grep -v grep | awk {'if ($2 > 100) print $1'} | xargs kill |
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
sudo yum install cups-libs dbus-glib libXrandr libXcursor libXinerama cairo cairo-gobject pango gtk3-devel alsa-lib libXScrnSaver git-core memcached nodejs cargo openssl-devel |
OlderNewer