Skip to content

Instantly share code, notes, and snippets.

View rodolfobandeira's full-sized avatar

Rodolfo rodolfobandeira

View GitHub Profile
@rodolfobandeira
rodolfobandeira / README.md
Created September 15, 2016 15:51 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
#!/usr/bin/env bash
#tmux new-session -d -s rails 'title rails-development; stty -ixon; vim'
cd ~/develop/projs/html5-audio-player-typescript
title oswp
tmux new-session -d -s oswp
# For some reason, send-keys does nothing here, not even an error is displayed.
@rodolfobandeira
rodolfobandeira / tmux.md
Created June 12, 2016 11:26
TMUX useful commands

Ctrl+b " - split pane horizontally.

Ctrl+b % - split pane vertically.

Ctrl+b arrow key - switch pane.

Hold Ctrl+b , don't release it and hold one of the arrow keys - resize pane.

Ctrl+b c - (c)reate a new window.

@rodolfobandeira
rodolfobandeira / php7-docker-debian.md
Created June 8, 2016 19:04
Install and compile PHP with Docker and Debian

docker run -dt —name debian01 debian

docker exec -it debian01 bash

sudo su;cd ~

apt-get update

apt-get install autoconf git make build-essential re2c bison libxml2-dev libssl-dev

class Foo
@foo = {
'test' => {'test2' => 'test3'},
'test4' => {'test5' => 'test6'},
}
def self.foo?
@foo
end
@rodolfobandeira
rodolfobandeira / proximo-feriado.go
Last active April 28, 2016 21:15
proximo-feriado
package feriado
import (
"fmt"
"github.com/go-chat-bot/bot"
"github.com/go-chat-bot/plugins/web"
"time"
)
const (
# A histogram of the words in the King James Bible
[('the', 63919),
('and', 51696),
('of', 34618),
('to', 13560),
('that', 12915),
('in', 12667),
('he', 10420),
('shall', 9837),
@rodolfobandeira
rodolfobandeira / datagrid.yml
Created April 23, 2015 19:07
Add owner filter on Leads/Opportunities datagrids - OroCRM
datagrid:
custom-sales-opportunity-grid:
extended_entity_name: %orocrm_sales.opportunity.class%
options:
entityHint: opportunities
export: true
entity_pagination: true
source:
type: orm
acl_resource: orocrm_sales_opportunity_view
@rodolfobandeira
rodolfobandeira / prediction-first-event.php
Created April 22, 2015 18:18
Create a first event using Prediction.io
<?php
require_once("vendor/autoload.php");
use predictionio\EventClient;
$accessKey = 'YOUR_ACCESS_KEY';
$client = new EventClient($accessKey);
$response = $client->createEvent(array(
'event' => 'my_event',
'entityType' => 'user',
@rodolfobandeira
rodolfobandeira / gist:49838e7a1f36a3c3b437
Created April 22, 2015 14:53
Export Amazon RDS mysql into a file or another database
mysqldump -h RDS instance endpoint -u user -p password --port=3306 --single-transaction --routines --triggers --databases database database2 > path/rds-dump.sql
mysqldump -h RDS instance endpoint -u user -p password --port=3306 --single-transaction --routines --triggers --databases database database2 --compress --compact | mysql -h MySQL host -u master user -p password --port 3306