Skip to content

Instantly share code, notes, and snippets.

View rkmax's full-sized avatar

Julian Reyes Escrigas rkmax

View GitHub Profile
#!/usr/bin/env bash
set -e
target_osx=$(sw_vers -productVersion)
project_dir=/Users/rkmax/development/aseprite
skia_dir=/Users/rkmax/development/skia
arch="$(uname -m)"
bundle_trial_url=https://www.aseprite.org/downloads/trial/Aseprite-v1.2.40-trial-macOS.dmg
@rkmax
rkmax / migrate_from_exist_hitory.sh
Created January 27, 2024 21:03 — forked from exdeniz/migrate_from_exist_hitory.sh
Remove Duplicate zsh History
cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zhistory
@rkmax
rkmax / ssh-tunnel-cheat-sheet.md
Created May 2, 2017 20:56 — forked from jkullick/ssh-tunnel-cheat-sheet.md
SSH Tunnel Cheat Sheet
# $LOCAL_IP: 'localhost' or machine from local network
# $LOCAL_PORT: open port on local machine
# $REMOTE_IP: remote localhost or IP from remote network
# $REMOTE_PORT: open port on remote site

# Forward Tunnel: map port from remote machine/network on local machine
ssh -L $LOCAL_PORT:$REMOTE_IP:$REMOTE_PORT $USER@$SERVER

# Reverse Tunnel: make local port accessable to remote machine
@rkmax
rkmax / php.ini
Created May 22, 2013 14:03 — forked from bzerangue/php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@rkmax
rkmax / jwtRS256.sh
Created January 14, 2018 22:13 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@rkmax
rkmax / 1-main.js
Created September 4, 2017 09:38 — forked from leaysgur/1-main.js
passwordless auth0 with amazon cognito
// const auth0 = require('auth0-js');
const webAuth = new auth0.WebAuth({
domain: '<YOUR_DOMAIN>',
clientID: '<YOUR_CLIENT_ID>',
});
@rkmax
rkmax / behat-jenkins.txt
Created January 23, 2012 15:33 — forked from robo47/behat-jenkins.txt
Behat, Symfony2, Jenkins
Ant-Task which runs behat:
<?xml version="1.0" encoding="UTF-8"?>
<project name="Foo" default="build" basedir=".">
....
<target name="behat">
<exec dir="${basedir}/" executable="php" failonerror="true">
@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
<?php
protected function _editAction(Post $post)
{
$em = $this->get('doctrine.orm.default_entity_manager');
$factory = $this->get('form.factory');
$form = $factory->create(new PostFormType());
$form->setData($post);
if ($this->get('request')->getMethod() === 'POST') {
@rkmax
rkmax / install.sh
Last active September 13, 2015 20:10 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Fastest mirrors
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse' >> /tmp/mirrors.txt
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse' >> /tmp/mirrors.txt
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse' >> /tmp/mirrors.txt
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse' >> /tmp/mirrors.txt
echo '' >> /tmp/mirrors.txt