Skip to content

Instantly share code, notes, and snippets.

@bsy
bsy / sq.md
Created November 9, 2022 02:02

stateDiagram-v2 [*] --> Importing Importing --> Tag: file_imported Tag --> Processing: tagging_completed ErrorProcessingSeed --> Processing: tagging_completed ErrorProcessingPredictions --> Processing: tagging_completed Processing --> Verify: predictions_processed Processing --> ProcessingSeed: seed_processing_started ProcessingSeed --> ErrorProcessingSeed: seed_processing_failed ProcessingSeed --> ErrorProcessingPredictions: seed_processing_failed

stateDiagram-v2 [] --> Importing Importing --> Tagging: import_file Tagging --> Processing: tagging_complete Processing --> Verifying: predictions_processed Processing --> Completed: complete_file_seeded Verifying --> Completing: verification_complete Completing --> Completed: verified_answers_written_to_new_file Completed --> []

@bsy
bsy / TS Lint Rules
Last active September 18, 2019 06:00
{
"extends": [
"tslint:recommended",
"tslint-eslint-rules",
"tslint-config-prettier",
"tslint-jasmine-rules"
],
"rulesDirectory": [
"node_modules/codelyzer",
"node_modules/@nrwl/workspace/src/tslint"
@bsy
bsy / postgres_queries_and_commands.sql
Created July 17, 2018 19:06 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@bsy
bsy / gist:aa63f4ec21bada6b5ac7
Created August 3, 2015 22:19
Install Docker on OSX
# Install Vagrant
https://www.vagrantup.com/downloads
# Install Docker CLI
http://bit.ly/docker_1_7
# Docker Machine
curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine
# What we do
Vouch is solving this multi-trillion dollar consumer finance challenge by creating technology and services for consumers to help each other permanently climb up the credit ladder and get control over their own financial freedom.
Our first product – a fixed-term consumer lending platform – is aimed at giving low-FICO consumers a path to building or fixing your credit. Credit is the first and most important step to getting a leg up in life, but it’s also an area where some established players have done more harm than good to their customers.
At Vouch, we’re building a way for your friends and family to help direct your trustworthiness – creating a socially-focused way to look at lending. We help customers build a network of trusted friends and family – people who would vouch for them in times of need by creating a way of looking at creditworthiness that spans beyond your FICO score because we understand you are more than your credit score.
# What you’d do
As a product designer, you would be res
@bsy
bsy / gist:1ab2a23d0c42329dbaa8
Created December 8, 2014 21:57
Clear out stale resque workers
Resque.workers.each {|w| matches = w.id.match(/^[^:]*:([0-9]*):[^:]*$/); pid = matches[1]; w.unregister_worker unless w.worker_pids.include?(pid.to_s)}
@bsy
bsy / gist:22ec3090b2123a4579bf
Created July 25, 2014 20:09
Record Android Screen (requires Kiti Kat 4.4)
adb shell screenrecord --bit-rate 8000000 --time-limit 30 /sdcard/kitkat.mp4
@bsy
bsy / gist:d4379adeb7b0837bd6a2
Created July 11, 2014 00:18
Obtain GPU card info
<script>
var canvas = document.createElement('canvas');
canvas.setAttribute("id", "gltestcanvas");
gl = null;
try {
// Try to grab the standard context. If it fails, fallback to experimental.
gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
}
catch(e) {
console.warn(e);
@bsy
bsy / gist:9069685
Created February 18, 2014 12:04
fix for nokogiri libxml2 issue on mavericks
gem install nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local