I hereby claim:
- I am handerson on github.
- I am heathanderson (https://keybase.io/heathanderson) on keybase.
- I have a public key whose fingerprint is 69FE B984 7C01 0847 BB07 5CE5 36F7 C6C8 8A01 EA2C
To claim this, I am signing this object:
<% const flattenPublicJSON = (obj = {}, res = [], extraKey = '/') => { | |
for(key in obj){ | |
if(Array.isArray(obj[key])){ | |
flattenPublicJSON(obj[key], res, `${extraKey}`); | |
}else if(key === '_contents'){ | |
res.push(`${extraKey}/${obj[key]}`); | |
} else if(key === '_data'){ | |
//ignore | |
} else if(typeof obj[key] !== 'object'){ | |
res.push(`${extraKey}${obj[key]}`); |
#!/usr/bin/env ruby | |
require 'optparse' | |
options = {} | |
OptionParser.new do |opts| | |
opts.on('-d n', '--directory=n', 'Set Directory') do |d| | |
options[:directory] = d | |
end | |
opts.on('-h', '--help', 'Displays Help') do |
require 'net/http' | |
require 'json' | |
token = '' | |
uri = URI('https://codeclimate.com/api/repos?api_token=' + token) | |
response = Net::HTTP.get(uri) | |
repos = JSON.parse(response) | |
test_coverage = [] |
var HighResolutionTimer = window.HighResolutionTimer = window.HighResolutionTimer || (function() { | |
var HighResolutionTimer = function(options) { | |
this.timer = false; | |
this.total_ticks = 0; | |
this.start_time = undefined; | |
this.current_time = undefined; |
// Add a class of "combox" to a select element to activate | |
function clonePosition(elementToMove, elementToClone){ | |
var $elementToClone = $(elementToClone); | |
var position = $elementToClone.position(); | |
var top = position.top; | |
var left = position.left; | |
var width = $elementToClone.width() - 40; | |
$(elementToMove).css({"position": "absolute", "top": top, "left": left, "width": width}); |
I hereby claim:
To claim this, I am signing this object:
require 'gollum/frontend/app' | |
require 'digest/sha1' | |
class App < Precious::App | |
User = Struct.new(:name, :email, :password_hash) | |
before { authenticate! } | |
helpers do | |
def authenticate! |
Copyright (c) 2012 Heath Anderson | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE O |
#MySQL Client | |
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysql /usr/bin/mysql | |
#MySQL Dump | |
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysqldump /usr/bin/mysqldump | |
#How to fix the "Library not loaded: libmysqlclient.18.dylib (LoadError)" error | |
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib |
require 'rubygems' | |
require 'cloudfiles' | |
require 'sqlite3' | |
cf = CloudFiles::Connection.new(:username => "", :api_key => "") | |
original = = SQLite3::Database.new('/var/www/project/current/db/original.db') | |
backup = SQLite3::Database.new('/home/deploy/backup.sqlite3') | |
backup_process = SQLite3::Backup.new(backup, 'main', original, 'main') |