This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* LD_PRELOAD shim which applies two patches necesary to get the game | |
* Divinity: Original Sin Enhanded Edition for Linux to work with Mesa (12+) | |
* | |
* Build with: gcc -s -O2 -shared -fPIC -o divos-hack.{so,c} -ldl | |
*/ | |
/* for RTLD_NEXT */ | |
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Programa que gerencia contas de um usuario | |
* Autores: - Romano Augusto M. de Souza - 407111432 | |
* - Nome - Matricula | |
* - Nome - Matricula | |
*/ | |
/* Inclusoes de bibliotecas */ | |
#include <stdio.h> // Uso de 'printf' e 'scanf' | |
#include <stdlib.h> // Uso de chamadas ao sistema operacional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('BASE_URL', 'http://chimera.labs.oreilly.com/books/1230000000545/'); | |
function getPage($url) | |
{ | |
$full_url = BASE_URL . $url; | |
echo "Crawleando página $full_url...", PHP_EOL; | |
$file = __DIR__ . '/ebook/'. $url; | |
file_put_contents($file, file_get_contents($full_url)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p {{0..9},{a..f}}/{{0..9},{a..f}}/{{0..9},{a..f}}/{{0..9},{a..f}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Pretty basic script for php psr0 refactoring | |
# USAGE: | |
# Don't touch the php file! Just use "git mv" and then run this script | |
FILES="" | |
function set_files_by_git_status() { | |
FILES=`git status -s | grep ^R | awk '{print $4}'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "quantal64" | |
config.vm.network :forwarded_port, guest: 8080, host: 8080 | |
config.vm.hostname = "vagrant-php" | |
config.vm.provision "shell", inline: <<SCRIPT | |
# Apt | |
sed -i 's,archive\.,br\.archive\.,' /etc/apt/sources.list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for elm in $@; do | |
database=$(echo $elm | cut -f1 -d '.') | |
tables=$(echo $elm | cut -f2 -d '.') | |
if [ $tables == "{*}" ]; then | |
tables=$(mysql -uroot -e "SHOW TABLES FROM $database") | |
tables=$(echo $tables | sed s",^Tables_in_$database,,") | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<!-- Setting a block that will NOT be overrided --> | |
{% block someBlock %}{% endblock %} | |
</head> | |
<body> | |
<!-- Using a component from Di --> | |
{{ myService.doAction() }} |