Skip to content

Instantly share code, notes, and snippets.

@marabesi
marabesi / .vimrc
Last active May 19, 2020 19:43
My personal .vimrc (generated by http://www.vim-bootstrap.com)
moved file content to https://github.com/marabesi/dotfiles
@marabesi
marabesi / build-file-example.xml
Created September 30, 2015 01:17
Simple build file to run with Phing within three targets
<?xml version="1.0" encoding="utf-8"?>
<project name="First Example" description="Clone, phpunit" default="phpunittests">
<property name="appdir" value="."/>
<property name="repodir" value="./app"/>
<property name="testdir" value="./app/tests"/>
<property name="repo" value="https://github.com/marabesi/laravel-pagseguro.git" />
<target name="clone">
<echo msg="Cloning repository ${repo} please wait"/>
<gitclone repository="${repo}" targetPath="${appdir}/app"/>
@marabesi
marabesi / simplest-phing-build.xml
Last active September 16, 2015 11:02
Simples build.xml you can have to run Phing
<?xml version="1.0" encoding="utf-8"?>
<project name="Basic Task" default="dist">
<target name="dist">
</target>
</project>
@marabesi
marabesi / Bitwise operation examples
Last active August 29, 2015 14:16
Example how to use the bitwise operators in a easy way
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | = 255 // just sum all the possible bit values in the table
| | | | | | | |
0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | = 10 // Representation of the 10 in bit
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | = 192 // Representation of the 192 in bit
AND (&) Operator (7 & 9) The bits must be active in either rows
0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | = 7
0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | = 9
@marabesi
marabesi / gist:d1ba13e832ce53e8ac73
Created June 5, 2014 11:16
Understanding the language with objects and prototype
function DebugConsole() {
var consoleElem = document.createElement('div');
consoleElem.id = "debug";
document.body.appendChild(consoleElem);
this.shaded = false;
}
DebugConsole.prototype.displayMsg = function(msg) {