- create your own user
adduser johndoe # root@vps
# now, relogin onto johndoe
mkdir .ssh
# copy ssh key from your local machine to johndoe's account
angular.module 'gulliver' | |
# This will transform data[Hash] into FormData object. | |
# Supports nested objects and FileList (file input's value). | |
# | |
# Note: This won't work on browsers not supporting FormData and FileList (f.e. IE 8-9). | |
.service 'httpTransformRequestToFormData', -> | |
(data) -> | |
return data unless data |
# ... | |
namespace :deploy do | |
desc 'Restart application' | |
task :restart => ["eye:reload", "eye:restart"] | |
after :published, :restart | |
end |
var IonicModule = angular.module('ionic'), | |
extend = angular.extend, | |
forEach = angular.forEach, | |
isDefined = angular.isDefined, | |
isString = angular.isString, | |
jqLite = angular.element; | |
/** | |
* @ngdoc directive | |
* @name ionVerticalSlideBox |
RAILS_ROOT = File.expand_path('../', File.dirname(__FILE__)) | |
RAILS_ENV = ENV['RAILS_ENV'] || 'production' | |
God.watch do |w| | |
w.name = "websocket_rails" | |
w.start = "cd #{RAILS_ROOT} && bundle exec rake websocket_rails:start_server" | |
w.stop = "cd #{RAILS_ROOT} && bundle exec rake websocket_rails:stop_server" | |
w.pid_file = "#{RAILS_ROOT}/tmp/pids/websocket_rails.pid" |
#!/bin/sh | |
# Exit, if there's no ios here. | |
[[ $CORDOVA_PLATFORMS == *"ios"* ]] || exit 0 | |
# This is needed until https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1116 gets fixed. | |
XCCONFIG_FILE="platforms/ios/cordova/build.xcconfig" | |
if ! cat $XCCONFIG_FILE | grep -q "ENABLE_BITCODE"; then | |
echo "\nENABLE_BITCODE = NO" >> $XCCONFIG_FILE | |
fi |
// See issue https://github.com/twbs/bootstrap/issues/8810 for more information. | |
// | |
// Thanks for the idea of the fix to: | |
// https://github.com/sixfootsixdesigns/Bootstrap-3-Grid-Columns-Clearing | |
@import "bootstrap/variables" | |
// Useful @media mixins (based on dimensions taken from bootstrap-sass) | |
=media-width-below($max) |
app.config ($injector) -> | |
model = ionic.Platform.device().model or "" | |
animateNavigation = ionic.Platform.grade == "a" | |
unless animateNavigation | |
defaults = | |
'$ionicNavBarConfig': | |
transition: 'no-animation' | |
'$ionicNavViewConfig': | |
transition: 'no-animation' |
# Idea from http://krautcomputing.com/blog/2012/10/07/how-to-make-everything-background-processable-through-sidekiq/ | |
# | |
# Usage: | |
# | |
# class Synchronization | |
# include Asyncable | |
# end | |
# | |
# Then: | |
# Synchronization.find(12).perform_async(:synchronize, 3, 2) |
#!/bin/sh | |
iptables -F | |
iptables -X | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A FORWARD -o lo -j ACCEPT | |
iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED |