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
// Setup | |
var array = []; | |
for(var i = 0; i < 1000; ++i) { array.push(i); } | |
var totals = {}; | |
var log = function (id, time) { | |
totals[id] = totals[id] ? totals[id] : []; | |
totals[id].push(time); | |
}; |
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/env ruby | |
require "rubyXL" | |
require "pry" | |
require "json" | |
# define from input | |
@key_col = 0 | |
@translation_col = 2 | |
file = PATH_TO_FILE |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.vertically_align { | |
width: 256px; | |
height: 256px; | |
overflow: hidden; | |
} |
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
require "oauth2" | |
require_relative "token" | |
module Api | |
class Client | |
def initialize(client_id:, client_secret:, endpoint:) | |
@client_id = client_id | |
@client_secret = client_secret | |
@endpoint = endpoint | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Scroll Test</title> | |
<style> | |
.wrapper { | |
height: 40px; | |
width: 400px; | |
overflow: auto; | |
} |
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/env ruby | |
inputs = [[1,2,3], [2,4,6], [1,3,5]] | |
inject_output = inputs.inject([]) do |memo, input| | |
memo |= input | |
memo | |
end | |
each_with_object_output = inputs.each_with_object([]) do |input, memo| |
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
source "https://rubygems.org" | |
gem "bcrypt" |
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
<?php namespace App\Http\Controllers; | |
use Illuminate\Foundation\Bus\DispatchesCommands; | |
use Illuminate\Routing\Controller as BaseController; | |
use Illuminate\Foundation\Validation\ValidatesRequests; | |
use Log; | |
use DB; | |
abstract class Controller extends BaseController { |
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
<!-- | |
Opening this in the latest Chrome (Version 45.0.2454.85) results in an error | |
"Uncaught SecurityError: Failed to execute 'replaceState' on 'History'" | |
This has only just stated happening this afternoon and doesn't cause an issue on older versions of Chrome | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing replaceState</title> | |
</head> |
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
/* change Facebook wall font size | |
/* copy this into the javaConsole in your browser with facebook open | |
and press enter */ | |
/* in Chrome this is opened by View | Developer | JavaScript Console | |
choose 'Console' (furthest right tab) and paste all of this in */ | |
/* in Safari this is a bit trickier, you need to enable hidden debug | |
menu, in Terminal enter: | |
defaults write com.apple.Safari IncludeDebugMenu 1 | |
Then restart Safari, open with Develop | Start Debugging JavaScript |
OlderNewer