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
:ID=>"f592d239-78a0-47d6-a391-025adc3f412d", | |
:Title=>"Remind me to request full moon shifts off from here on out.", | |
:MediaUrl=>"http://1.bp.blogspot.com/_JW500q8ddNk/TUeUNEx7IYI/AAAAAAAAA5U/A6gI5XdXa4g/s1600/full_moon.jpg", | |
:SourceUrl=>"http://www.gratuity-not-included.com/2011/01/full-moon.html", | |
:DisplayUrl=>"www.gratuity-not-included.com/2011/01/full-moon.html", | |
:Width=>"1280", | |
:Height=>"1024", | |
:FileSize=>"243053", | |
:ContentType=>"image/jpeg", | |
:Thumbnail=> |
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
2.1.5 :011 > 'begin' <=> 'end' | |
=> -1 | |
2.1.5 :012 > 'same' <=> 'same' | |
=> 0 | |
2.1.5 :013 > a = [5, 3, 4, 1] | |
=> [5, 3, 4, 1] | |
2.1.5 :014 > a.sort | |
=> [1, 3, 4, 5] | |
2.1.5 :015 > a.any? {|i| i > 6} | |
=> false |
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
class HashMachine | |
## Source: https://github.com/peterhellberg/hashids.rb | |
## In this example I'm using 11 as the size of the hash. This is the same size youtube uses | |
require 'hashids' | |
@@my_salt = 'this is my salt' | |
@@my_hash_size = 11 | |
def hashids |
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
#!/usr/bin/expect -f | |
# Use: browser_search.sh <query-to-be-searched> | |
set QUERY [lindex $argv 0] | |
set username "YOUR_USERNAME" | |
set hostname "YOUR_HOSTNAME" | |
# In Case you need a password. You can use this var and uncomment lines bellow | |
# It is better to add your public ssh key in authorized keys in your HOST | |
set password "YOUR_PASSWORD" |
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 | |
COMMAND="'open https://www.google.com/search?q=\"$@\"'" | |
ssh fellipebrito@`netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10` \'$COMMAND\' |
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
// Download the Run Javascript Chrome Extension: | |
// https://chrome.google.com/webstore/detail/run-javascript/lmilalhkkdhfieeienjbiicclobibjao | |
function hideIt(elementToBeHidden){ | |
document.getElementsByClassName(elementToBeHidden)[0].style.display = "none"; | |
} | |
function sleep(duration) { | |
return new Promise(resolve => { | |
setTimeout(() => { |