Skip to content

Instantly share code, notes, and snippets.

View rudisimo's full-sized avatar
🔕

Rudy Puig rudisimo

🔕
View GitHub Profile
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User Rudisimo
Group staff
</IfModule>
</IfModule>
@rudisimo
rudisimo / rAF.js
Created November 6, 2013 04:08 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
<VirtualHost *:80>
ServerName mydomain.local
ProxyPass / http://127.0.0.1:4567/
ProxyPassReverse / http://127.0.0.1:4567/
ProxyPreserveHost On
ProxyTimeout 3600
ProxyVia Off
</VirtualHost>
@rudisimo
rudisimo / vimrc
Last active December 26, 2015 22:49
" https://github.com/tpope/vim-pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on
set nocompatible " make Vim behave in a more useful way
set noerrorbells " don't beep
set nobackup " don't use local backup files
set noswapfile " don't use local swap files
$.ajax("http://api.tlmdservices.com/v1/versus/?sort=latest&limit=15&microsite=Dama_y_Obrero").done(function(res) {
var v, vlen, versus, i, ilen, item, c, clen, comb, state, items = {};
for (v=0, vlen=res.data.length; v<vlen; v++) {
versus = res.data[v];
console.log('versus:', versus.id, '('+versus.title+')');
console.log(' items:', versus.items.length);
for (i=0, ilen=versus.items.length; i<ilen; i++) {
item = versus.items[i];
console.log(' item:', item.id, '('+item.title+')');
items[item.id] = true;
@rudisimo
rudisimo / os.rb
Last active December 25, 2015 17:39
# -*- mode: ruby -*-
# vi: set ft=ruby ts=2 sw=2 sts=2 et :
require 'date'
require 'find'
module OS
def OS.win?
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end
import sys
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
(items, swaps) = test.rstrip('\n').split(":")
items = [item.strip(' ') for item in items.strip(' ').split(' ')]
swaps = [swap.strip(' ').split('-') for swap in swaps.strip(' ').split(',')]
for swap in swaps:
(a, b) = [int(pos) for pos in swap]
items[b], items[a] = items[a], items[b]
print ' '.join(items)
Bootstrap to phase 0. [0.01 sec, 3.77 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.02 sec, 4 MB] [bootstrap]
Loading drushrc [bootstrap]
"/mnt/www/html/dbtv/docroot/sites/all/drush/drushrc.php" into
"drupal" scope. [0.03 sec, 4.01 MB]
Include /mnt/www/html/dbtv/docroot/sites/all/drush/commands [0.04 [notice]
sec, 4.03 MB]
Cache HIT cid: 5.8-commandfiles-0-0db0da8ecb2a8aed88ffd7e75f9b6779 [debug]
[0.05 sec, 4.05 MB]
DRUSH_BACKEND:{"type":"bootstrap","message":"Bootstrap to phase 0.","timestamp":1380160810.668,"memory":11040680,"error":null,"packet":"log"}
@rudisimo
rudisimo / gist:6673368
Created September 23, 2013 16:43
.htaccess
AddHandler application/x-httpd-php52 .php
SetEnv PHPRC /usr/local/etc/php/5.2
SetEnv PHP_INI_SCAN_DIR /usr/local/etc/php/5.2/conf.d
AddHandler application/x-httpd-php53 .php
SetEnv PHPRC /usr/local/etc/php/5.3
SetEnv PHP_INI_SCAN_DIR /usr/local/etc/php/5.3/conf.d
AddHandler application/x-httpd-php54 .php
SetEnv PHPRC /usr/local/etc/php/5.4
@rudisimo
rudisimo / gist:6550645
Last active December 22, 2015 23:59
macvim failed to build on 10.8

brew install -v macvim 2>&1

==> Downloading https://github.com/b4winckler/macvim/archive/snapshot-71.tar.gz
Already downloaded: /Library/Caches/Homebrew/macvim-7.4-71.tar.gz
tar xf /Library/Caches/Homebrew/macvim-7.4-71.tar.gz
==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --with-ruby-command=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby --with-tlib=ncurses --with-compiledby=Homebrew --with-local-dir=/usr/local --enable-cscope --enable-pythoninterp=yes
./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --with-ruby-command=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby --with-tlib=ncurses --with-compiledby=Homebrew --with-local-dir=/usr/local --enable-cscope --enable-pythoninterp=yes
configure: creating cache auto/config.cache

checking whether make sets $(MAKE)...