Skip to content

Instantly share code, notes, and snippets.

View devdbrandy's full-sized avatar
🎯
Meditating

Harry Dbrandy devdbrandy

🎯
Meditating
View GitHub Profile
@andrewmunro
andrewmunro / .babelrc
Created July 17, 2017 11:30
Sequelize cli with ES6
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
],
}
module.exports = {
up: function (queryInterface, Sequelize) {
return [
queryInterface.addColumn('User', 'name', {
type: Sequelize.STRING
}),
queryInterface.addColumn('User', 'nickname', {
type: Sequelize.STRING,
})
];
@greyscaled
greyscaled / README.md
Last active September 19, 2022 08:59
Sequelize + Express + Migrations + Seed Starter
@23maverick23
23maverick23 / heroku_commands.sh
Last active July 12, 2022 15:39
Bash: Heroku bash commands
# Heroku Django Commands #
# ---------------------- #
# Push local git changes to heroku
git push heroku master
# Login to heroku via toolbelt
heroku login
# View heroku processes
@s1moe2
s1moe2 / 20181118235404-some-migration.js
Last active February 4, 2022 17:34
Sequelize migration add/drop multiple columns (transacting)
// NOTE: MySQL does not support transactional DDL (https://dev.mysql.com/doc/internals/en/transactions-notes-on-ddl-and-normal-transaction.html)
// You should use this with a (cool) DBMS such as PostgreSQL.
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.sequelize.transaction((t) => {
return Promise.all([
queryInterface.addColumn('table_name', 'column_name1', {
type: Sequelize.STRING
}, { transaction: t }),
@LucienLee
LucienLee / anomalies.js
Last active August 6, 2021 07:14
JavaScript Anomalies
/* Closure */
const buttons = document.getElementsByClassName('three-buttons');
for (var i = 0; i < 3; i++) {
buttons[i].addEventListener(function(){
console.log(i)
});
}
// Click 1st button -> 2
// Click 2nd button -> 2
// Click 3rd button -> 2
@sdrew
sdrew / Procfile
Last active July 27, 2021 15:25
Laravel configs for Heroku/Dokku
web: vendor/bin/heroku-php-apache2 public/
@iwek
iwek / html5-video-test
Created July 9, 2012 18:12
HTML5 Video Test
<video controls>
<source src=http://techslides.com/demos/sample-videos/small.webm type=video/webm>
<source src=http://techslides.com/demos/sample-videos/small.ogv type=video/ogg>
<source src=http://techslides.com/demos/sample-videos/small.mp4 type=video/mp4>
<source src=http://techslides.com/demos/sample-videos/small.3gp type=video/3gp>
</video>
@psd
psd / index.html
Created June 13, 2012 10:09
iframe thumbnail
<!doctype html>
<html>
<head>
<title>page thumbnails using iframes and CSS3</title>
<meta charset="utf-8">
<style>
.thumbnail {
width: 300px;
height: 160px;
}
@akhilome
akhilome / get-github-ssh.md
Last active September 5, 2019 12:21
Generate and add github ssh to linux machine

First run ...

ssh-keygen -t rsa -b 4096 -C 'email@domain.com'

... from terminal, then run ...

eval "$(ssh-agent -s)"