This file contains hidden or 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 App < Sinatra::Base | |
configure do | |
set :logger_level, :warn | |
set :logger_log_file, File.join(root, 'log', "#{environment}.log") | |
end | |
configure :development do | |
set :logger_level, :debug | |
end |
This file contains hidden or 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 'bundler' | |
Bundler.setup | |
require 'benchmark/ips' | |
class ArrayDemo | |
def initialize(data) | |
@data = data | |
end |
This file contains hidden or 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 -e | |
TEMP_FILE=/tmp/authorized_keys | |
KEYS_FILE=~/.ssh/authorized_keys | |
GITHUB_USER=$1 | |
test -n $GITHUB_USER | |
echo "Sync SSH authorized keys from Github user ${GITHUB_USER}" | |
mkdir --mode=700 -p ~/.ssh | |
curl -f -o $TEMP_FILE https://github.com/${GITHUB_USER}.keys |
This file contains hidden or 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
console.clear(); | |
// Define User model | |
const defaultValues = { | |
// Should be `undefined` value at all | |
id: undefined, | |
name: undefined, | |
dob: undefined, | |
friends: undefined, | |
}; |
OlderNewer