Public Gists by gerhard

Gravatar
Sun Nov 08 14:45:53 -0800 2009
1
2
3
/* Jquery plugin for quick Comet long polling connections
Nothing special about this (just a recursive Ajax call).
The key is having the server hold connections open until there's data to push back to the client.
Gravatar
Sun Nov 08 09:50:32 -0800 2009
1
2
3
  * executing `deploy:setup'
* executing "sudo -p 'sudo password: ' mkdir -p ~/files-rsync && sudo -p 'sudo password: ' chown $USER ~/files-rsync && cd ~/files-rsync && chmod g+w . && git init && git config receive.denyCurrentBranch ignore"
servers: ["brubox"]
Gravatar
Thu Oct 29 07:22:34 -0700 2009
1
2
3
+__rvm_gems_load:53> [[ -f /home/gerhard/.rvm/gems/cache/webrat-0.5.3.gem ]]
+__rvm_gems_load:56> cache_file=+__rvm_gems_load:56> cache_file=+__rvm_gems_load:56> head -n1
+__rvm_gems_load:56> cache_file=''
Gravatar
Thu Oct 15 13:39:44 -0700 2009
1
2
3
➜ ~ rvm gems dump system
➜ ~ rvm use ree
➜ ~ which ruby
Gravatar
Tue Oct 13 02:07:30 -0700 2009
1
2
3
 # Taken from passenger_memory_stats script
 
  # Returns the private dirty RSS for the given process, in KB.
Gravatar
Tue Oct 13 02:07:09 -0700 2009

      
Gravatar
Mon Oct 12 23:06:23 -0700 2009
1
2
3
# Run me with:
#
# $ watchr less.watchr
Gravatar
Mon Oct 12 09:13:05 -0700 2009

      
Gravatar
Thu Oct 08 23:25:11 -0700 2009
1
2
3
//-------------------------------------------------------------
function get_prefs()
{
Gravatar
Thu Sep 10 17:05:04 -0700 2009
1
2
3
# in ~/.screenrc:
bindkey -d ^? stuff ^H
bindkey -d ^@ stuff ^H
Gravatar
Sun Jul 26 05:31:11 -0700 2009
1
2
3
In response to all the responses to:
 
http://twitter.com/rtomayko/status/1155906157
Gravatar
Tue Jul 21 06:25:56 -0700 2009
1
2
3
def fudge_time
  User.record_timestamps = false
  u = User.find_by_email(email)
Gravatar
Fri Jul 10 07:24:02 -0700 2009
1
2
3
text_replacement : function(selector) {
    $(selector).each(function() {
      replace_element = $(this);
Gravatar
Wed Jul 01 01:26:13 -0700 2009
1
2
3
# all defaults
matthew@bumble:~$ cat /etc/apache2/mods-enabled/deflate.conf
<IfModule mod_deflate.c>
Gravatar
Thu Jun 11 18:37:37 -0700 2009
1
2
3
# install vim
yum install vim-common vim-enhanced
 
Gravatar
Wed Jun 10 23:44:22 -0700 2009
1
2
3
# zesty.rb
## Bit Zesty default rails stack
 
Gravatar
Fri Jun 05 07:20:26 -0700 2009
1
2
3
<!-- use this where you want the search form to appear -->
<txp:glz_custom_fields_search_form searchby="My select value, radio_value, section, category, checkbox_value" section="all" />
 
Gravatar
Thu Jun 04 09:52:59 -0700 2009
1
2
3
## RAILS
alias sa='ruby ./script/about'
alias ss='ruby ./script/server'
Gravatar
Tue Jun 02 04:32:45 -0700 2009
1
2
3
# courtesy of doener from git IRC channel. Thanks man!
 
A---B---C---D (master)
Gravatar
Tue Jun 02 03:34:40 -0700 2009
1
2
3
A---B---C---D---M---E---F (master)
         \ /
          H---I