Skip to content

Instantly share code, notes, and snippets.

@adamrdavid
adamrdavid / get_gh_deletions_top_hits.md
Created December 15, 2023 15:21
Git hub CLI command to get PR links in order of most net deletions
gh pr list --author GH_USERNAME --state merged --limit 1000 --json url,deletions,additions --jq 'map({url, additions, deletions, net: (.additions - .deletions)}) | sort_by(.net)[:10]'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adamrdavid
adamrdavid / db_guidelines.md
Last active July 14, 2023 13:03
the darndest things

Keybase proof

I hereby claim:

  • I am adamrdavid on github.
  • I am adampadam (https://keybase.io/adampadam) on keybase.
  • I have a public key ASDuN0n9RSS5iSrzPXuMZx4t22CJEeYEH1IgfcIEBORKiwo

To claim this, I am signing this object:

@adamrdavid
adamrdavid / gulpfile.js
Created January 13, 2017 05:37 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@adamrdavid
adamrdavid / rules.md
Created July 4, 2016 07:02 — forked from henrik/rules.md
Sandi Metz' four rules from Ruby Rogues episode 87. Listen or read the transcript: http://rubyrogues.com/087-rr-book-clubpractical-object-oriented-design-in-ruby-with-sandi-metz/
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done. And your view can only know about one instance variable.

You can break these rules if you can talk your pair into agreeing with you.

@adamrdavid
adamrdavid / index.md
Created June 21, 2016 06:10 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one