Skip to content

Instantly share code, notes, and snippets.

View rudisimo's full-sized avatar
🔕

Rudy Puig rudisimo

🔕
View GitHub Profile

Wifi Authentication

https://securelogin.arubanetworks.com/cgi-bin/login

Spotify IPs

78.31.8.0/24
78.31.12.0/24
193.182.8.0/24
<?php
// Define the current environment.
$_ENV['AH_SITE_ENVIRONMENT'] = 'local';
// Define the base url of the local site.
$base_url = 'http://local.nbcutelemundo';
$databases['default'] = array('default' =>
array (
LoadModule php5_module /usr/local/opt/php54/libexec/apache2/libphp5.so
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
#
# 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)