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"
@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}";
@ck-on
ck-on / ocp.php
Last active September 5, 2024 01:35
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@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
@BrandonSmith
BrandonSmith / AndroidManifest.xml
Last active July 19, 2023 19:11
Quick example of how to schedule a notification in the future using AlarmManager
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"