Skip to content

Instantly share code, notes, and snippets.

View andersonfraga's full-sized avatar
🧩
Focusing

Anderson Fraga andersonfraga

🧩
Focusing
View GitHub Profile
@rafaelrosafu
rafaelrosafu / .bashrc
Last active July 26, 2017 07:39
Customized bash prompt, with tweaks to git, ls, grep. Save it to ~/.bashrc, should run automatically on new Ubuntu versions, but you cannot have a .bash_profile in the home dir
#=====================================================
# Personal environment variables and startup programs
#=====================================================
# If not running interactively, don't do anything
# vagrant breaks without this
case $- in
*i*) ;;
*) return;;
esac
@lucashungaro
lucashungaro / links.textile
Created August 14, 2010 16:36
Links de referência utilizados em minha palestra
@teepark
teepark / btree.py
Created September 9, 2010 22:45
a pure-python B tree and B+ tree implementation
import bisect
import itertools
import operator
class _BNode(object):
__slots__ = ["tree", "contents", "children"]
def __init__(self, tree, contents=None, children=None):
self.tree = tree
@migrs
migrs / dropbox
Created September 23, 2010 00:19
/etc/init.d/dropbox
# /etc/init.d/dropbox
### BEGIN INIT INFO
# Provides: dropbox
# Required-Start: $network $syslog $remote_fs
# Required-Stop: $network $syslog $remote_fs
# Should-Start: $named $time
# Should-Stop: $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the dropbox daemon for debian/ubuntu
@0xnbk
0xnbk / .php
Created October 8, 2010 04:56
File download with speed limit
<?php
// local file that should be send to the client
$local_file = 'test-file.zip';
// filename that the user gets as default
$download_file = 'your-download-name.zip';
// set the download rate limit (=> 20,5 kb/s)
$download_rate = 20.5;
if(file_exists($local_file) && is_file($local_file)) {
// send headers
@jharjono
jharjono / sinatra_sass_coffee.rb
Created March 7, 2011 19:12
a setup of Sinatra using Slim for HTML, Sass for CSS, and CoffeeScript for JavaScript
#!/usr/bin/env ruby
# Libraries:::::::::::::::::::::::::::::::::::::::::::::::::::::::
require 'rubygems'
require 'sinatra/base'
require 'slim'
require 'sass'
require 'coffee-script'
# Application:::::::::::::::::::::::::::::::::::::::::::::::::::
@pksunkara
pksunkara / config
Last active June 10, 2024 13:56
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@dgmike
dgmike / Install.sh
Created June 18, 2011 16:34
Install Lessjs + CSSLint
#!/bin/bash
# pre install
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
sudo apt-get install python-software-properties
# install nodejs
sudo add-apt-repository ppa:jerome-etienne/neoip
sudo apt-get update
@juanplopes
juanplopes / test.cpp
Created October 11, 2011 13:57
Decompiled c++ hello world
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!" << endl;
}
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.