This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'sqlite3', | |
:database => 'database') | |
ActiveRecord::Base.connection.execute <<-SQL | |
CREATE TABLE IF NOT EXISTS users ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | |
name VARCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set tabstop=4 " Tab characters = 4 spaces when displayed | |
set shiftwidth=2 " Use 2 spaces for each insertion of (auto)indent | |
set softtabstop=2 " Tabs 'count for' 2 spaces when editing (fake tabs) | |
set expandtab " <tab> -> spaces in insert mode | |
set autoindent " always set autoindenting on | |
set smarttab " Smart tabbing! | |
set shiftround " < and > will hit indent levels instead of +-4 always | |
set hlsearch | |
set incsearch | |
set number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first clone your repo | |
git clone path/to/my/repo path/to/clone | |
# do some initial housecleaning: | |
rm -rf .git/refs/original/ | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
git gc --aggressive --prune=now | |
# note the repo size: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var _ = require('lodash'); | |
var request = require('../helpers').request; | |
module.exports = { | |
models: [], | |
loaded: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/puma.rb | |
workers Integer(ENV['WEB_CONCURRENCY'] || 1) | |
threads_count = Integer(ENV['MAX_THREADS'] || 2) | |
threads threads_count, threads_count | |
preload_app! | |
rackup DefaultRackup | |
port ENV['PORT'] || 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
window.Card = React.createClass({ | |
mixins: [ReactDND.DragDropMixin], | |
statics: { | |
configureDragDrop: function(register) { | |
register('card', { | |
dragSource: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
var itemTemplate = $('#templates .item'); | |
var list = $('#list'); | |
// when I load the page, I want to get the tasks from the API | |
$.ajax({ | |
type: 'GET', | |
url: "https://listalous.herokuapp.com/lists/lobatis-list", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var events = (function(){ | |
var topics = {}; | |
function getQueue(topic) { | |
topics[topic] = topics[topic] || []; | |
return topics[topic]; | |
} | |
return { | |
subscribe: function(topic, listener) { |
NewerOlder