Skip to content

Instantly share code, notes, and snippets.

View evilbuck's full-sized avatar

Evil Buck evilbuck

  • evilbuck llc
  • Hobe Sound, FL
View GitHub Profile
@evilbuck
evilbuck / index.js
Created August 30, 2021 14:36 — forked from stalniy/index.js
CASL + Objection
const { defineAbility } = require('@casl/ability');
const { rulesToQuery } = require('@casl/ability/extra');
const Knex = require('knex');
const { Model } = require('objection');
const { interpret } = require('@ucast/objection')
const { CompoundCondition } = require('@ucast/core')
const knex = Knex({
client: 'sqlite3',
connection: ':memory:'
@evilbuck
evilbuck / .gitconfig
Last active September 21, 2021 18:45 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
ci = commit
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
@evilbuck
evilbuck / git-selective-merge.md
Created February 27, 2019 16:03 — forked from katylava/git-selective-merge.md
git selective merge

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp