Skip to content

Instantly share code, notes, and snippets.

View defbyte's full-sized avatar

Chris Davis defbyte

View GitHub Profile
@defbyte
defbyte / tasty-ass-beans-and-greens.md
Last active February 16, 2018 21:50
Tasty Ass Beans & Greens

Ingredients

  • 2 cloves garlic, minced or pressed
  • 1-2 tbsp Olive oil
  • 8oz Chicken or Veggie Broth
  • 1 can Cannelloni Beans or Great Northern Beans or Black-eyed Peas (drain and rinsed)
  • 0.5-1 tbsp Crushed Red Pepper Flakes
  • 1 Bunch Kale or Collard Greens (soak/rinse, drain, and dry off if you can)
  • salt (to taste, at the end)
  • (optional) 1 tsp onion granules
@defbyte
defbyte / rails-model-snippet.cson
Created March 3, 2016 20:51
Atom Rails Model snippet
'.source.ruby':
'Rails Model Scaffold':
'prefix': 'rmodel'
'body': """
class $1 < ActiveRecord::Base
# ---------------------------------------------------------------------------
# Scopes
# ---------------------------------------------------------------------------
@defbyte
defbyte / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@defbyte
defbyte / delete_django_content_type
Created January 30, 2014 18:10
Delete Django Content Types
from django.contrib.contenttypes.models import ContentType
ContentType.objects.filter(app_label='YOUR_DEAD_AND_BURIED_APP').delete()
@defbyte
defbyte / simple-ajax.js
Created May 22, 2013 20:32 — forked from gmac/simple-ajax
Greg's Simple AJAX as a Require module.
/*
Simple AJAX
by Greg MacWilliam
https://gist.github.com/gmac/5630172
*/
define('simple-ajax', function() {
var ajax = (function( root ) {
function getRequest() {
@defbyte
defbyte / csv-parser.js
Last active December 17, 2015 15:19 — forked from gmac/csv-parser
Require module of Greg's CSV Parser
/*
Parse CSV Function
Thanks to Greg MacWilliam:
https://gist.github.com/gmac/5620847#file-csv-parser
*/
define('parse-csv', function (){
var parseCSV = (function( root ) {
return function parseCSV(csv, delimiter) {
@defbyte
defbyte / simple-ajax
Last active December 17, 2015 15:18
Greg's Simple AJAX as a Require module Greg's source: https://gist.github.com/gmac/5630172
/*
Simple AJAX
by Greg MacWilliam
https://gist.github.com/gmac/5630172
*/
define('simple-ajax', function() {
var ajax = (function( root ) {
function getRequest() {
@defbyte
defbyte / gist:1132172
Created August 8, 2011 16:53
String.slugify
// Add "slugify" method to String
String.prototype.slugify = function(){
return this.replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase();
};