Public Gists by aviflombaum

Gravatar
Sat Jun 13 07:51:09 -0700 2009
1
*/5 * * * * cd /home/deploy/www/dp_neocon/current/ && /usr/local/bin/lockrun --lockfile=/tmp/detweeter.lockrun -- /usr/local/bin/rake RAILS_ENV=production detweeter
Gravatar
Sat Jun 13 07:45:33 -0700 2009
1
*/5 * * * * /usr/local/bin/lockrun --lockfile=/tmp/detweeter.lockrun -- cd /home/deploy/www/dp_neocon/current/ && /usr/local/bin/rake RAILS_ENV=production detweeter
Gravatar
Wed May 13 23:23:40 -0700 2009
1
2
3
class ActionController::CgiRequest
  def search_bot?
    self.user_agent =~ /(Baidu|bot|Google|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg|Jeeves|ms)/i
Gravatar
Wed May 13 07:57:29 -0700 2009
1
2
3
SlideTweet = function(){
// setTimeout(function(){
// }, 2000)
Gravatar
Thu Apr 30 15:56:34 -0700 2009
1
Embed
Gravatar
Tue Mar 24 15:55:48 -0700 2009
1
2
3
function enable_edit_mode(){
$('.is_editable').each(function(){
          $(this).bind('click.edit_mode', function(e){
Gravatar
Wed Mar 18 12:13:13 -0700 2009
1
2
3
# What Does Harvest Do?
 
# Connects to a DataSource
Gravatar
Tue Mar 17 19:05:47 -0700 2009
1
2
3
# What Does Harvest Do?
 
# Connects to a DataSource
Gravatar
Thu Mar 12 18:11:14 -0700 2009
1
<iframe src="http://www.designerpages.com/collections/yanko-design/widget" style="border:0; overflow: hidden; height: 620px" border="0"></iframe>
Gravatar
Wed Feb 25 19:31:44 -0800 2009
1
2
3
#!/usr/bin/env ruby
#
# usage: script/server_restarter
gist: 59736 A ruby wrapper to search go...
Gravatar
Fri Feb 06 18:21:12 -0800 2009
1
2
3
require 'rubygems'
require 'httparty'
 
Gravatar
Mon Feb 02 15:28:22 -0800 2009
1
2
3
  def after_save
    unless @skip_callbacks
      import_products_by_id(self.product_ids_for_import) if should_import_products?
Gravatar
Mon Dec 29 10:39:49 -0800 2008
1
2
3
ebay_data = Scrubyt::Extractor.define do
 
  fetch 'http://www.ebay.com/'
Gravatar
Sun Sep 28 19:18:02 -0700 2008
1
2
3
  # Will yield sets of size, useful when you have to iterate over large sets
  # if you have an array of 50k elements, running .each is slow.
  def in_blocks_of(s)
Gravatar
Thu Sep 18 09:25:09 -0700 2008
1
2
3
 delegate: function(rules) {
      return function(e) {
        var target = $(e.target), parent = null;
Gravatar
Wed Sep 17 18:48:21 -0700 2008
1
2
3
// The bestest event-delegator ever!
jQuery.fn.delegate = function(eType, r) {
  return this.bind(eType, function(e) {var $t = $(e.target); for(var s in r) if($t.is(s)) return r[s].apply(this, arguments)})