Skip to content

Instantly share code, notes, and snippets.

Millennials just wanna have 🥑s

Lucas lfzawacki

Millennials just wanna have 🥑s
View GitHub Profile
lfzawacki / changedb
Created May 14, 2014
Simple script to manage different database.yml files in a rails development environment
View changedb
# Use an appropriate file path for your ruby interpreter
require 'fileutils'
class ChangeDB
def initialize dir='config/.changedb', db_yml='config/database.yml'
@dir = dir
@db_yml = db_yml
lfzawacki / bbb-whiteboard.css
Created Jul 21, 2014
BBB whiteboard meteor
View bbb-whiteboard.css
/* CSS declarations go here */
svg {
border: 1px solid #000;
#messages {
margin-left: 400px;
# Convert lots of *.flac into *.mp3 for consumption in devices without flac support
# Usage is:
# $ cd yourflacfolder
# $ convertmp3
# Files will be created in a new directory
MP3DIR="`basename \"$PWD\"` - mp3"
lfzawacki / user.rb
Created Mar 3, 2015
Users logged last month
View user.rb
class User < ActiveRecord::Base
def self.login_last_month { |u| u.last_sign_in_at && (u.last_sign_in_at + 30.days) >= }.count
lfzawacki / alarm.ino
Last active Aug 29, 2015
Introdução a Programação com Arduino (28/03/15)
View alarm.ino
Por Lucas Zawacki e galera da oficina de introdução a Arduino
const int buttonPin = 2;
const int buzzerPin = 11;
const int sensorPin = 4;
const int ledPin = 13;
lfzawacki /
Last active Aug 29, 2015
#!/bin/bash -e
echo " --- Download and check sha256 sum"
lfzawacki /
Created Aug 7, 2015
Using local Gemfiles

Using local Gemfiles

This is useful if you're working on a project with other developers and want to use different gems locally that you don't have to commit to the repository.

Get the Gemfile.local file

From this repository The rest the instructions here are mostly based on what is written there with some modifications.

View OOP with closures
POINT = {} = function(pnt, x, y)
local pt = {}
function pt.display(pnt, comment)
lfzawacki / pandoc_example
Created Jan 5, 2011
Example of usage of pandoc to generate a book like document
View pandoc_example
% A Lua Book
% Many Great guys
# Installing Lua
Pretty easy
# Rocketing to the Moon
View gist:1035519
From 14134e4fad0d549b8cdda34d411174c084076dc5 Mon Sep 17 00:00:00 2001
From: Lucas Fialho Zawacki <>
Date: Wed, 8 Jun 2011 23:49:34 -0300
Subject: dinput: EnumDevicesBySemantics enumerating system keyboard and mouse
dlls/dinput/dinput_main.c | 98 +++++++++++++++++++++++++++++++++++++++++---
1 files changed, 91 insertions(+), 7 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c