Skip to content

Instantly share code, notes, and snippets.

View alextucker's full-sized avatar
🙏

Alex Tucker alextucker

🙏
View GitHub Profile
@alextucker
alextucker / stringcalc.clj
Created October 31, 2014 00:57
Simple Clojure String Calculator
(defn string-to-int-list
[string-list]
(map read-string (str/split string-list #"\s|,")))
(defn string-calculator
[numbers]
(if (= numbers "") 0
(reduce + (string-to-int-list numbers))))
setw -g mode-mouse off
set-option -g mouse-resize-pane off
set-option -g mouse-select-pane off
set-option -g mouse-select-window off
set -g prefix C-a
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix
@alextucker
alextucker / notes.md
Last active August 29, 2015 14:01
JavaScript: Hipsters Need Not Apply
@alextucker
alextucker / service.js
Created April 22, 2014 13:28
Promise Returning Service Pattern
angular.module('myapp.services.usersettings', [])
.factory('UserSettingsService', ['$q', '$http', function($q, $http){
return {
getSettings: function(id) {
var defer = $q.defer(); // A defer object that you control
$http.get('some/url')
.success(function(resp){
defer.resolve(data);
})
python manage.py syncdb
export HOME=/app
for file in /app/.profile.d/*; do source $file; done
hash -r
cd /app # This is the folder where django app got deployed
docker images # See a listing of all of your docker images
docker run -i -t app/myapp /bin/bash # Start an interactive terminal inside of your container
git remote add dokku [email protected]:myapp
git push dokku master
dokku postgresql:create myapp
cd /var/lib/dokku/plugins
git clone https://github.com/Kloadut/dokku-pg-plugin
dokku plugins-install