Skip to content

Instantly share code, notes, and snippets.

View alextucker's full-sized avatar
🙏

Alex Tucker alextucker

🙏
View GitHub Profile
cd /home/git
echo yourdomain.com >> VHOST
cat ~/.ssh/id_rsa.pub | ssh [email protected] "gitreceive upload-key alex"
cd /var/lib/dokku/plugins
git clone https://github.com/Kloadut/dokku-pg-plugin
dokku plugins-install
dokku postgresql:create myapp
git remote add dokku [email protected]:myapp
git push dokku master
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
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
python manage.py syncdb
@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);
})
@alextucker
alextucker / notes.md
Last active August 29, 2015 14:01
JavaScript: Hipsters Need Not Apply