I hereby claim:
- I am imrohan on github.
- I am rohanlikhite (https://keybase.io/rohanlikhite) on keybase.
- I have a public key ASArKbJOWKNkeeIBwSWX7hEfT1PES0capni8a8J9LiAdpQo
To claim this, I am signing this object:
body{ | |
-webkit-animation: adjustHue 1s alternate infinite; | |
} | |
@-webkit-keyframes adjustHue { | |
0% { | |
-webkit-filter: hue-rotate(30deg); | |
} | |
50% { | |
-webkit-filter: hue-rotate(60deg); |
if (window.DeviceMotionEvent == undefined) { | |
// No Sensor Detected | |
} else { | |
window.ondevicemotion = function (event) { | |
// Grab x/y vals | |
ax = Math.round(Math.abs(event.accelerationIncludingGravity.x)); | |
ay = Math.round(Math.abs(event.accelerationIncludingGravity.y)); | |
// Check if Device is Tilted | |
if (ax !== 0 | ay !== 0){ | |
//Device is tilted |
generateRandomColor: (mix) -> | |
red = Math.random() * 256 >> 0 | |
green = Math.random() * 256 >> 0 | |
blue = Math.random() * 256 >> 0 | |
if mix != null | |
red = (red + mix.red) / 2 >> 0 | |
green = (green + mix.green) / 2 >> 0 | |
blue = (blue + mix.blue) / 2 >> 0 | |
rr = red.toString(16) |
Verifying that +likhite is my blockchain ID. https://onename.com/likhite |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
I hereby claim:
To claim this, I am signing this object:
=Create Tests= | |
rails g integration_test name_of_test | |
=Running Tests= | |
rake (all tests) | |
rake test:[models, integration] | |
ruby -I"lib:test" path/to/test_file.rb -n "test_name_of_test" | |
=Debug= | |
save_and_open_page |
formatAllotmentValue = (value) -> | |
_value = parseFloat(value) | |
if parseFloat((_value%(Math.floor(_value))).toFixed(1)) >= 0.5 | |
return Math.floor(_value) + 0.5 | |
else | |
return Math.floor(_value) |
Latency Comparison Numbers | |
-------------------------- | |
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 |
// Download a playlist from index, and skip errors | |
sudo youtube-dl -i --playlist-start 0 [link] | |
-i = continue on error (skip song) | |
--playlist-start [index] = start downloading at a index | |
// Download a mp3 form youtube | |
sudo youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" [link] | |
// Download mp3 from Soundcloud ignore errors | |
sudo youtube-dl -i -o "%(title)s.%(ext)s" [link] |