Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo "===> install memcached.so in OSX Mavericks"
HAVE_PEAR=$(which pear)
if [[ $HAVE_PEAR == "" ]] ; then
echo '===> no pear found'
echo '===> trying to install it...'
@royriojas
royriojas / vimrc
Last active January 1, 2016 06:39
vimrc
"set nocompatible
"source $VIMRUNTIME/vimrc_example.vim
"set selectmode=mouse
"set backupdir=/tmp
"set directory=/tmp
set guifont=Monaco:h13
"set guioptions-=T
"set errorfile=/tmp/rutkowsk.errors.log
"set ic
"set fileformats=dos,unix,mac
@royriojas
royriojas / index.js
Last active March 27, 2016 08:25
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Rebuild to run it on the right
var esformatter = require( 'esformatter' );
var esformatterJSX = require( 'esformatter-jsx' );
var throttle = require( 'lodash.throttle' );
var hash = window.location.hash.substr( 1 );
var extend = require('extend');
var params;
@royriojas
royriojas / install.apc.sh
Last active December 14, 2016 02:29 — forked from ryanjbonnell/gist:4074061
Install apc on mac os X. Works in Mavericks!
#!/bin/bash
echo '===> install apc.so in OSX Mavericks'
mkdir -p ~/tmp/apc-deps
# Compile PCRE - Perl Compatible Regular Expressions
cd ~/tmp/apc-deps
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.33.tar.gz
tar -xvzf pcre-8.33.tar.gz
@royriojas
royriojas / rulers.js
Created February 21, 2017 02:49
rulers.js
$(`<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous"></script>`).appendTo('head')
$(`<link href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" rel="stylesheet" type="text/css" />`).appendTo('head');
var createBox = () => {
const w = 100;
const h = 100;
const style = `
@royriojas
royriojas / cloudSettings
Created April 5, 2020 20:45 — forked from MisaelRiojas/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-12-01T18:40:07.609Z","extensionVersion":"v3.2.2"}
@royriojas
royriojas / cloudSettings
Last active April 5, 2020 20:47
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-09-25T07:36:27.222Z","extensionVersion":"v3.4.3"}
@royriojas
royriojas / .gitconfig
Last active April 5, 2020 21:03
dotfiles
[user]
# name = yourname
# email = <your@email>
[core]
whitespace = trailing-space,space-before-tab,cr-at-eol
excludesfile = ~/.gitignore_global
[color]
diff = auto
status = auto
branch = auto
@royriojas
royriojas / why-I-love-Javascript.md
Last active September 30, 2020 13:58
Why I love Javascript

Why I love Javascript

  1. Because it has a humble origin... Designed in 10 days... was proclaimed death several times, and it was planned to be replaced by many other more "powerful" languages

  2. Because it has closures and lambdas, and the prototypal inheritance (the good parts)

  3. Because it is weird, in a very nice sense... (some bad parts... maybe?)

From the video WAT (https://www.destroyallsoftware.com/talks/wat)

@royriojas
royriojas / commands.bash
Created November 25, 2018 09:04
Fix cannot find driver - Creative SoundBlaster Omni Control Panel issue
# If you receive the following error while trying to open the Creative SoundBlaster Omni Control Panel
#
# ==============================================================
# Cannot start the app because the audio driver cannot be found
# ==============================================================
# then this is the solution:
# In the command line execute:
#
sudo kextload -b com.Creative.driver.TruStudioPCUSBAudioPlugin