Skip to content

Instantly share code, notes, and snippets.

View jonatasnona's full-sized avatar
🇧🇷
Working from home

Jonatas Pedraza jonatasnona

🇧🇷
Working from home
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
# generating the list of integers
numbers = [random.randint(0,10) for num in range(1, 8)]
print "array:", numbers
# calculate average
#!/bin/bash -e
sudo pip install redis
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# **postinstall.sh** is a script executed after Debian/Ubuntu has been
# installed and restarted. There is no user interaction so all commands must
# be able to run in a non-interactive mode.
#
# If any package install time questions need to be set, you can use
# `preeseed.cfg` to populate the settings.
### Setup Variables
# The version of Ruby to be installed supporting the Chef and Puppet gems
let s:N1 = [ '#141413' , '#aeee00' , 232 , 154 ] " blackestgravel & lime
let s:N2 = [ '#f4cf86' , '#45413b' , 222 , 238 ] " dirtyblonde & deepgravel
let s:N3 = [ '#8cffba' , '#242321' , 121 , 235 ] " saltwatertaffy & darkgravel
let s:N4 = [ '#666462' , 241 ] " mediumgravel
let s:I1 = [ '#141413' , '#0a9dff' , 232 , 39 ] " blackestgravel & tardis
let s:I2 = [ '#f4cf86' , '#005fff' , 222 , 27 ] " dirtyblonde & facebook
let s:I3 = [ '#0a9dff' , '#242321' , 39 , 235 ] " tardis & darkgravel
let s:V1 = [ '#e2e2e2' , '#4f3598' , 254 , 56 ] " blackestgravel & orange
@jonatasnona
jonatasnona / hash.c
Created April 29, 2014 22:16 — forked from tonious/hash.c
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
struct entry_s {
char *key;
char *value;
// database.js file
var client = require("mongodb").MongoClient;
client.connect('mongodb://127.0.0.1:27017/foodb', function (err, db) {
if (err) {
throw err;
}
exports.users = db.collection("users");
#!/bin/sh
red="\033[1;31m"
color_end="\033[0m"
# Check unwanted trailing whitespace or space/tab indents;
if [[ `git diff --cached --check` ]]; then
echo -e ${red}Commit failed${color_end}
git diff --cached --check
@jonatasnona
jonatasnona / gist:6065069
Last active December 20, 2015 03:39
essential apps
ack-grep
debian-archive-keyring (experimental debian packages)
cmake
youtube-dl