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
function sleep(milliseconds) { | |
var start = new Date().getTime(); | |
for (var i = 0; i < 1e7; i++) { | |
if ((new Date().getTime() - start) > milliseconds){ | |
break; | |
} | |
} | |
} | |
function unscramble() { |
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
<h1 class="logo"> | |
<span class="word1">scram</span> <br /> | |
<span class="word2">solutions</span> | |
</h1> | |
<div class="form"> | |
<ul class="tab-group"> | |
<li class="tab active"><a href="#signup">Scrambled Words</a></li> | |
<li class="tab"><a href="#login">Word List</a></li> |
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
// ==UserScript== | |
// @name FANS Poller | |
// @namespace https://fcswat-us.aka.amazon.com/workflow/init | |
// @description manages the display tabs | |
// @include https://fcswat-us.aka.amazon.com/workflow/init | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// workflow message |
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
def base64 | |
@data = params[:data] | |
@choice = params[:choice] | |
if !["encode", "decode"].include?(@choice) | |
render :action => 'base64' | |
end | |
end |
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
current_url = window.location.href; | |
if (window.addEventListener) { | |
window.addEventListener("storage", handler, false); | |
} else { | |
window.attachEvent("onstorage", handler); | |
}; | |
function handler(e) { | |
sids = JSON.parse(localStorage['sids']); |
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
// ==UserScript== | |
// @name MDPass | |
// @namespace * | |
// @include https://*/* | |
// @description View parital MD5 values of password fields for visual comparison. | |
// @version 1 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js | |
// @grant none | |
// ==/UserScript== |
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/ruby | |
# Find users in the Employee hash by using their last name + first name (needs to be unique) | |
class Employee | |
attr_reader :f_name, :l_name, :email, :phone | |
EMPLOYEE = {} | |
AREA_CODE = 555 # This is just to generate number in a specific area code | |
PROMPT = '> ' | |
def initialize(f_name, l_name, email, phone) | |
@f_name = f_name | |
@l_name = l_name |
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
ran_num = rand(0..1) | |
if ran_num == 0 | |
PLAYER = "X" | |
COMPUTER = "O" | |
@turn = :player | |
else | |
PLAYER = "O" | |
COMPUTER = "X" | |
@turn = :computer | |
end |
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/ruby | |
WINS = { :computer => 0, :user => 0, :draws => 0 } | |
HANDLER = { | |
:rock => { :rock => :tie, :paper => :lose, :scissors => :win}, | |
:paper => { :rock => :win, :paper => :tie, :scissors => :lose}, | |
:scissors => { :rock => :lose, :paper => :win, :scissors => :tie }, | |
} |
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/ruby | |
require 'mechanize' | |
require 'io/console' | |
def decrypt(str) | |
final = [] | |
for i in (0..str.length) | |
i.odd? ? final << str[i-2] : final << str[i] | |
end |
NewerOlder