I hereby claim:
- I am johntopley on github.
- I am johntopley (https://keybase.io/johntopley) on keybase.
- I have a public key whose fingerprint is A4BC BD01 B761 E247 376F DDEB 38C8 9216 191D ECC0
To claim this, I am signing this object:
# See comments for https://sideprojectsoftware.com/blog/2015/02/22/sinatra-authentication | |
require 'bcrypt' | |
require_relative 'database' | |
class User | |
include BCrypt | |
attr_reader :name | |
attr_reader :last_signin |
# See comments for https://sideprojectsoftware.com/blog/2015/02/22/sinatra-authentication | |
require 'mysql2' | |
class Database | |
def initialize(config = {}) | |
@connection = Mysql2::Client.new(config['database']) | |
@connection.query_options.merge!(symbolize_keys: true) | |
end | |
-- See comments for https://sideprojectsoftware.com/blog/2015/02/22/sinatra-authentication | |
DROP TABLE IF EXISTS `users`; | |
CREATE TABLE `users` ( | |
`id` int(11) NOT NULL auto_increment, | |
`username` varchar(255) NOT NULL default '', | |
`password_hash` varchar(255) NOT NULL default '', | |
`last_signin` timestamp NOT NULL default current_timestamp, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `username_index` (`username`) |
I hereby claim:
To claim this, I am signing this object:
LogFormat "remote_host=%h, remote_logname=%l, remote_user=%u, time=%t, request=\"%r\", status=%>s, bytes=%b, referer=\"%{Referer}i\", user_agent=\"%{User-agent}i\"" splunk_combined |
#!/bin/bash | |
build=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
build=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $build" "$INFOPLIST_FILE" |
#!/bin/bash | |
build=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
curl --user {userId}:"" --include --request POST --header "Content-Type: application/json" --data-binary "{\"value\":$build}" https://api.numerousapp.com/v1/metrics/{metricId}/events |
map.resource :session, :controller => 'session', | |
:only => [:new, :create, :destroy], | |
:requirements => { :protocol => ssl_protocol } |
class HelloWorld | |
def call(env) | |
[200, { 'Content-Type' => 'text/html' }, 'Hello Rack!'] | |
end | |
end |
java.util.Date dateUpdated = new Date(rset.getTimestamp("DateUpdated").getTime()); |