View hubcode.zsh
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}" | |
} |
View hnjobsfilter.js
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; | |
} |
View just_use_fkeys.sql
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'); |
View desc.txt
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) |
View jwt.go
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" |
View db.go
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" |
View restart
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
#!/bin/bash | |
# sudo stop www-blit.com | |
# rm /var/www/blit/tmp/puma/* | |
# sudo start www-blit.com | |
# TODO: figure out how to restart sidekiq | |
ps auxf | grep "blit" | |
blit_puma_pid=$(ps -C ruby -F | grep '/puma.*\[blit\]' | awk {'print $2'}) | |
echo "sending SIGUSR1 to pid $blit_puma_pid" | |
kill -s SIGUSR1 $blit_puma_pid |
View cmd
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
lessc bootstrap.less --clean-css="--s1 --advanced --compatibility=ie8" > ~/Projects/textrocket/public/css/lib/ |
View limit.maxfiles.plist
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> |
View activerecord
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
Summary: | |
Total: 13.0664 secs. | |
Slowest: 0.3004 secs. | |
Fastest: 0.0760 secs. | |
Average: 0.1303 secs. | |
Requests/sec: 76.5321 | |
Status code distribution: | |
[200] 1000 responses |
NewerOlder