If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
mac=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` | |
echo $mac | |
sudo ifconfig en0 ether $mac |
function droidshot { | |
saveto=~/droidshots | |
fname=$(date +"%Y%m%d%H%M").png | |
[[ ! -z $1 ]] && fname=$1 | |
[[ -d $saveto ]] || mkdir $saveto | |
adb shell screencap -p /sdcard/$fname | |
adb pull /sdcard/$fname $saveto/$fname | |
adb shell rm /sdcard/$fname | |
echo "saved to $saveto/$fname" | |
} |
#!/usr/bin/bash | |
# You might want to note your old MAC address here. Use this to get it: | |
# ifconfig en0 | grep ether | |
MAC_ADDRESS=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` | |
echo "Setting MAC address..." | |
sudo ifconfig en0 ether $MAC_ADDRESS | |
ifconfig en0 | grep ether |
def click_fb_okay_button | |
%x{osascript<<APPLESCRIPT | |
tell application "iPhone Simulator" | |
activate | |
end tell | |
tell application "System Events" | |
tell process "iPhone Simulator" | |
set the position of the first window to {1, 1, 1, 1} | |
delay 1 |
Not this is rocket sience :)
Fill the water heater with a finger more than 1 liter of water. Set it on its power-base, hit the button that’s all the way out on the handle. This starts the heating process. Now hit the “minus” (“-”) button so you see a red light on the 90° marker. Let it heat up. In the meantime:
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
from selenium import webdriver | |
from time import sleep | |
d = webdriver.Chrome() | |
d.get('http://mrcoles.com/piano/') | |
sleep(2) | |
d.execute_script('document.querySelector(\'.keys\').style.width=\'791px\' ; var es = document.querySelectorAll(\'.black\') ; for (var e = 0 ; e < es.length ; ++e) { es[e].style.width = \'1px\'; }') | |
keymap = {'a': [-3, 9], 'a#': [-2, 10], 'bb': [-2, 10], 'b': [-1, 11], 'c': [-12, 0, 12], 'c#': [-11, 1], 'd': [-10, 2], 'd#': [-9, 3], 'eb': [-9, 3], 'e': [-8, 4], 'f': [-7, 5], 'f#': [-6, 6], 'g': [-5, 7], 'g#': [-4, 8]} | |
def key(letter, pos): |
TO: [email protected] (usually provided on the card you get) | |
Sehr geehrtes Zollamt, | |
am DD.MM.YYYY erhielt ich ein Schreiben über den Eingang einer Sendung bei der keine Rechnung angebracht war. | |
lfd. Nr: <NR> | |
Empfänger: <Name>, <Adresse>, <PLZ> <Ort> | |
Bei dem Paket handelt es sich um ein T-Shirt das mir geschenkt wurde da ich in meiner Freizeit kostenlose Software für die Integration mit einem Datenanalyse Dienst geschrieben habe (siehe http://support.metrics.librato.com/knowledgebase/articles/53548). Das T-Shirt ist vermutlich mit dem Logo des Dienstes bedruckt / hat keinen offiziellen Marktwert. Die Materialkosten sind wahrscheinlich ~20 EUR. |
#! /usr/bin/env ruby | |
puts(open("vcards-XING.vcf").lines.map do |line| | |
$1.chomp if line =~ /^EMAIL.*:(.*)$/ | |
end.compact.uniq.join(',')) |