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
package db | |
import ( | |
"database/sql" | |
"log" | |
"strings" | |
"sync" | |
_ "github.com/lib/pq" // required for database/sql | |
"golang.org/x/net/context" |
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
-- saving here for later reference incase I decide to complicate things, decided to just use foreign keys | |
create table user_groups { | |
id bigint PRIMARY KEY default id_generator(), | |
account_id bigint not null references accounts(id) on delete cascade on update cascade, | |
updated_at timestamptz, | |
name citext not null | |
} | |
CREATE TYPE notification_level AS ENUM ('change', 'complete', 'digest', 'all'); |
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
// Don't care much about inheritance at this point, but I'll probably attempt it at | |
// some point via cloning ancestor schema's | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
var Contact = new Schema({ | |
_type: String, | |
name: String | |
}); |
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
package cmd | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"os" | |
"regexp" | |
"strings" |
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
1) see re: increasing shmmax http://stackoverflow.com/a/10629164/1283020 | |
2) add to postgresql.conf: | |
shared_preload_libraries = 'pg_stat_statements' # (change requires restart) | |
136 pg_stat_statements.max = 1000 | |
137 pg_stat_statements.track = all | |
3) restart postgres | |
4) check it out in psql |
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
hubcode () { | |
local repo=$1 | |
[[ ! $repo =~ "https://*" ]] && repo="https://github.com/${repo}" | |
local temp="$(mktemp -d)" | |
git clone --depth 1 "${repo}" "${temp}" | |
code --wait -n "${temp}" | |
rm -rf "${temp}" | |
} |
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
var gojobs = 0, elixirjobs = 0, rubyjobs = 0; | |
document.querySelectorAll('.athing.comtr').forEach(function(el){ | |
var text = el.innerText.toLowerCase(); | |
var show = false; | |
if (text.indexOf('golang')>0 || text.indexOf(', go ')>0 || text.indexOf(' go,')>0) { | |
gojobs++; show=true; | |
} | |
if (text.indexOf('elixir')>0) { | |
elixirjobs++; show=true; | |
} |
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
deliver {reset_code: user.password_reset_code_deliver!} | |
#SyntaxError (/Users/troy/Projects/church/app/controllers/api/users_controller.rb:126: syntax error, unexpected ':', expecting '}' | |
# deliver {reset_code: user.password_reset_code_deliver!} | |
# ^): | |
deliver({reset_code: user.password_reset_code_deliver!}) | |
# umm, ok ruby so parens are optional when? |
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
Next generation background screening technology disrupting the industry with mobile first candidate experience, automated compliance, single-sign-on integrations and fastest delivery (98% of reports, less than 27 hours) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>limit.maxfiles</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> |
NewerOlder