Skip to content

Instantly share code, notes, and snippets.

View rkmax's full-sized avatar

Julian Reyes Escrigas rkmax

View GitHub Profile
@rkmax
rkmax / git_config.sh
Created March 2, 2011 05:32
Configuración básica de GIT & Aliases
#!/bin/bash
git config --global color.ui auto
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.cl clone
git config --global alias.fe fetch
git config --global alias.me merge
git config --global alias.ca "commit -a"
@rkmax
rkmax / ComponentLoader.js
Created April 8, 2011 20:49
Cargador de componententes Extjs via Ajax
Ext.namespace('Ext.ux');
/**
* @class Ext.ux.ComponentLoader
* @author Aaron Conran
* Provides an easy way to load components dynamically. If you name these components
* you can use Ext.ComponentMgr's onAvailable function to manipulate the components
* as they are added.
* @singleton
*/
@rkmax
rkmax / install-r15b.sh
Created December 14, 2011 20:59 — forked from ramgole/install-r14b04.sh
Script to install Erlang R15B (tested on a fresh Ubuntu 11.10 install)
# You will need to make this file executable (chmod u+x) and run it with sudo
apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk
mkdir -p /src/erlang
cd /src/erlang
wget http://www.erlang.org/download/otp_src_R15B.tar.gz
tar -xvzf otp_src_R15B.tar.gz
chmod -R 777 otp_src_R15B
cd otp_src_R15B
./configure
make
@rkmax
rkmax / vmadmin.sh
Created January 31, 2012 15:34
Admin VM on VirtualBOx
#!/bin/bash
VM_CMD=VBoxManage
VM_NAME=$2
usage() {
C_NAME=`basename $0`
cat << EOF
VMadmin Utility
@rkmax
rkmax / Rakefile
Created October 18, 2012 21:08
Assets compiling for non rails project with Sprockets
require 'sprockets'
require 'logger'
require 'fileutils'
require 'pathname'
require 'json'
ROOT = Pathname(File.dirname(__FILE__))
LOGGER = Logger.new(STDOUT)
BASE_PATH = "path/to/assets"
@webcss
webcss / fireactive.js
Last active October 6, 2016 17:10
Firebase.com with Mithril - the functional way
var fireactive = function(controller) {
return function(args) {
var instance = {};
var _ref = args.firebase;
instance.ref = _ref;
if (args.asObject) {
_ref.on('value', function asObject(snap) {
@creationix
creationix / output.log
Created May 8, 2013 22:02
Working version of generator async code sample. Using node from https://github.com/andywingo/node/tree/v8-3.19
tim@touchsmart:~/Code$ nvm use v0.11.2-generators
Now using node v0.11.2-generators
tim@touchsmart:~/Code$ node --harmony testgen.js
<Buffer 76 61 72 20 66 73 20 3d 20 72 65 71 75 69 72 65 28 27 66 73 27 29 3b 0a 66 75 6e 63 74 69 6f 6e 20 72 65 61 64 46 69 6c 65 28 70 61 74 68 2c 20 65 6e 63 ...>
Sleeping for 2000ms...
Done
@leaysgur
leaysgur / 1-main.js
Last active June 12, 2018 15:37
passwordless auth0 with amazon cognito
// const auth0 = require('auth0-js');
const webAuth = new auth0.WebAuth({
domain: '<YOUR_DOMAIN>',
clientID: '<YOUR_CLIENT_ID>',
});
@bjo3rnf
bjo3rnf / EntityHiddenType.php
Last active November 19, 2021 17:19
Hidden field for Symfony2 entities
<?php
namespace Dpn\ToolsBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Dpn\ToolsBundle\Form\DataTransformer\EntityToIdTransformer;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\Common\Persistence\ObjectManager;
@cbmd
cbmd / default.conf
Created December 9, 2012 21:13
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";