Skip to content

Instantly share code, notes, and snippets.

Avatar

Don Pinkus donpinkus

View GitHub Profile
@donpinkus
donpinkus / sequelize.md
Created Nov 8, 2019
Sequelize migration docs
View sequelize.md

Creating a model from scratch

  1. How do you create a migration for a new model? $ sequelize model:create --name User --attributes "email:string, password:string"

  2. How do you create a migration for a new model with an association? Run step 1, then add it yourself.

Updating a model

  1. How do you create a migration for an existing model? $ sequelize migration:generate --name doSomeThingsHere
View Atom Style LESS file
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
View .block
license: gpl-3.0
@donpinkus
donpinkus / .block
Created Jan 31, 2017
Force-Directed Graph
View .block
license: gpl-3.0
height: 600
View gist:f3394e2cf90806657969a22ddd8f7cb3
var cvpHandlers = {
canvasClickHandler: null,
videoTimeUpdateHandler: null,
videoCanPlayHandler: null,
windowResizeHandler: null
};
var CanvasVideoPlayer = function(options) {
var i;
View coin_flip.lua
-- Sample script to make an HTTP request with query parameters
local response = http.request {
url = 'http://www.random.org/integers/',
params = {
num=1, min=0, max=1, format='plain',
rnd='new', col=1, base=10
}
}
if tonumber(response.content) == 0 then
return 'heads'
@donpinkus
donpinkus / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@donpinkus
donpinkus / SassMeister-input-HTML.html
Created Jun 21, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div id="susyContainer">
<div id="susyOffset">
</div>
</div>
You can’t perform that action at this time.