Skip to content

Instantly share code, notes, and snippets.

View lsdr's full-sized avatar

Luiz Rocha lsdr

  • São Paulo, Brazil
  • 17:30 (UTC -03:00)
View GitHub Profile
@lsdr
lsdr / config.js
Created April 12, 2017 19:00
Gaveteiro CKEditor Config
// CKEditor configuration - Gaveteiro
// referencia: http://docs.ckeditor.com/#!/api/CKEDITOR.config
// https://github.com/galetahub/ckeditor#customize-ckeditor
CKEDITOR.editorConfig = function( config )
{
config.language = 'pt-br';
config.height = 250;
config.allowedContent = true;
@lsdr
lsdr / neovim-setup.md
Created February 2, 2016 11:58 — forked from adamzaninovich/neovim-setup.md
How to get an awesome neovim setup that runs tests asynchronously in a neoterm split

How to get an awesome neovim setup that runs tests asynchronously in a neoterm split

Example

Installing neovim

brew install neovim/neovim/neovim
@lsdr
lsdr / NEATEvolve.lua
Last active August 11, 2018 12:52
MarI/O: the script that learns how to play Mario Bros/Mario Kart
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
-- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level,
-- and put a copy in both the Lua folder and the root directory of BizHawk.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
kooljobs: {
shell: "/bin/bash",
// Dependent systems
depends: ["redis"],
$ azk start
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `wyaeld/postgres:9.3` image...
azk: ⇲ downloading `wyaeld/postgres:9.3` image...
3a831d2c7eb9: Download completeazk: ◴ waiting start `postgres` system, try connect port data/tcp...
azk: ↑ starting `gaveteiro-frontend` system, 2 new instances...
azk: ✓ checking `rails:4.1` image...
azk: ⇲ downloading `rails:4.1` image...
de10a6ea16ef: Pull completeazk: ↻ provisioning `gaveteiro-frontend` system...
azk: ◴ waiting start `gaveteiro-frontend` system, try connect port http/tcp...
@lsdr
lsdr / 01-console-output-broken-rails
Last active August 29, 2015 14:13
Problem with azk and postgresql
$ azk start
[ ... snip ...]
azk: Installing sass 3.4.9
azk: Installing sass-rails 5.0.1
azk: Installing spring 1.2.0
azk: Installing uglifier 2.6.0
azk: Installing web-console 2.0.0
azk: Your bundle is complete!
azk: It was installed into /azk/bundler
azk: postgres_development already exists
@lsdr
lsdr / tunemac.sh
Last active August 29, 2015 14:11
mac osx tunning script (yosemite version)
# Shamelessly stolen from fnando:
# https://github.com/fnando/dotfiles/blob/master/files/.bash/macosx.sh
#
# Disable menu bar transparency
#defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Show remaining battery time; hide percentage
#defaults write com.apple.menuextra.battery ShowPercent -string "NO"
#defaults write com.apple.menuextra.battery ShowTime -string "YES"
@lsdr
lsdr / windows-vm-box
Created May 12, 2014 17:34
sometimes a windows vm box is quite useful
# IE10 - Win8
curl -O "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE10_Win8/IE10.Win8.For.MacVirtualBox.part{1.sfx,2.rar,3.rar}"
brew install openblas;
brew info qrupdate --with-openblas;
brew install suite-sparse --with-openblas;
brew install fltk;
brew install octave --with-openblas --with-fltk
@lsdr
lsdr / Vagrantfile
Last active February 8, 2016 19:24
# My helpers
#
def fwd_ports(config, ports=[])
Array[*ports].each do |port|
config.vm.network :forwarded_port, guest: port, host: port
end
end
def share_folder(config, source, destiny)
if File.directory? File.expand_path(source)