- Passion
- Wants to learn
- Eager to learn
- Aptitude
- Can learn a new language with little help
- Understands basics to a Language
- Language comprehension
"'this has quotes'".gsub("'", "\\'") # => "this has quotes'this has quotes" |
require 'grit' | |
Grit.debug = true # to show when remotes could not be fetched in STDOUT | |
files = Dir.glob(File.join("**", ".git")) | |
files.each do |f| | |
dir = File.expand_path "../", f | |
puts "Fetching #{dir}" | |
r = Grit::Repo.new dir | |
r.remote_fetch 'origin', timeout: false # Use https://github.com/coffeencoke/grit/tree/pass_options_to_fetch |
Among applying the changes in the other files in this gist, you need to symlink the directory you are serving the app with in the root app's public directory so that NGINX can serve the static files in the sub-app.
For example, if you have an app at /home/coffeencoke/apps/app.coffeencoke.com/current/public
as your root app, and you have the sub app served at http://app.coffeencoke.com/admin, then you need to symlink /home/coffeencoke/apps/admin-app.coffeencoke.com/current/public
to /home/coffeencoke/apps/app.coffeencoke.com/current/public/admin
like so:
ln -s /home/coffeencoke/apps/admin-app.coffeencoke.com/current/public /home/coffeencoke/apps/app.coffeencoke.com/current/public/admin
# Just do it | |
find . -type f -exec sed -i '' 's/from/to/g' {} \; |
server { | |
listen 80; # Listen on port 80 for IPv4 requests | |
server_name build.yourdomain.com; | |
access_log /var/log/nginx/jenkins_access.log; | |
error_log /var/log/nginx/jenkins_error.log; | |
location ~ ^/static/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\/(.*)$ { | |
#rewrite all static files into requests to the root |
# General Use Aliases | |
alias l='ls -lha' | |
alias ll='ls -lha' | |
alias c='clear' | |
alias cx='chmod +x' | |
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
# Ruby / Ruby on Rails Aliases | |
alias cucumber='cucumber --require features' |
#!/bin/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /home/capistrano/path/to/app/config/redis/production.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
$(function(){ | |
$('.subnav').fixElementOnScroll(45, 'subnav-fixed'); | |
$('.sidebar-nav').fixElementOnScroll(113, 'fixed'); | |
}); |
rvm uninstall 1.9.3 | |
# Download http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | |
tar xzf yaml-0.1.4.tar.gz | |
cd yaml-0.1.4 | |
./configure | |
make | |
make install | |
rvm install 1.9.3 | |