Skip to content

Instantly share code, notes, and snippets.

View soapdog's full-sized avatar
😸
BlogCatting

Andre Alves Garzia soapdog

😸
BlogCatting
View GitHub Profile
@soapdog
soapdog / query_logger.lua
Created February 11, 2017 18:16
little query logger for sailor
--------------------------------------------------------------------------------
-- query_logger.lua, v0.1.0: A quick and dirty logger to help with query debuging
-- This file is a part of Sailor project
-- Copyright (c) 2017 Andre Garzia <[email protected]>
-- License: MIT
-- http://sailorproject.org
--------------------------------------------------------------------------------
local sailor = require "sailor"
local main_conf = require "conf.conf"
@soapdog
soapdog / docker-compose.yml
Created November 27, 2016 19:05
Sample docker compose file for developing Sailor framework based web apps
version: '2'
services:
web:
depends_on:
- db
build: academy-server/.
image: amoralabs/academy
ports:
- "8080:80"
- "8443:443"
@soapdog
soapdog / sample_server.lua
Created November 18, 2016 01:27
trying out sample api for my little flyweb server
local server = require("flyweb_server")
server
.configure {hostname = "sample-server", port = 3030}
.route({path = "/"}, function(_, res)
res:send_static_file("index.html")
end)
.route({path = "/led", method = "POST"}, function(req, res)
print("POST: " .. req.POST)
res:send("text/plain", "you posted: " .. req.POST)
@soapdog
soapdog / course.toml
Last active September 22, 2016 23:03
Exploring different file formats for holding courseware info
defaultLanguage = "portuguese"
[english]
name = "A Taste of ESP8266 with MicroPython"
blurb = "An introduction to physical computing using the ESP8266 board and the MicroPython language"
hero = "en/hero.jpg"
flow = [
"en/intro.md",
"en/basics.md",
"en/project.md",
@soapdog
soapdog / Naive benchmark for Luvit vs Nodejs
Created September 21, 2016 20:23
Naive benchmark for Luvit vs Nodejs
This is a naive benchmark, it may not reflect real world usage. I basically used the same server script for Lua (luvit) and NodeJS
and fired the siege tool against it for 60 seconds and then 120 seconds. Luvit came ahead on both cases.
=== NodeJS 60s ===
Transactions: 18136 hits
Availability: 94.64 %
Elapsed time: 49.61 secs
Data transferred: 0.21 MB
Response time: 0.04 secs
@soapdog
soapdog / executing opkg update
Created September 20, 2016 17:57
opkg update problems on Tessel 2
C:\Users\soapdog
λ t2 root
INFO Looking for your Tessel...
INFO Connected to tesselfafi.
INFO Starting SSH Session on Tessel. Type "exit" at the prompt to end.
BusyBox v1.23.2 (2016-09-02 15:27:43 EDT) built-in shell (ash)
Tessel 2 / Built on OpenWrt
@soapdog
soapdog / agenda.txt
Last active March 30, 2016 19:03
RC Call for Friday 8th April
Roll call! If you were a migrating bird where would you migrate to and why?
*
*
*
New New resources for clubs
Integrating a Mozilla Club in a Library http://mozilla.github.io/learning-networks/clubs/hosting-mozilla-club-in-library/
Using design thinking at events http://mozilla.github.io/learning-networks/clubs/design-thinking/
How to be participatory and playful at events guide http://mozilla.github.io/learning-networks/clubs/encouraging-participatory-playful-learning/
Increasing digital literacy with women guide http://mozilla.github.io/learning-networks/clubs/increasing-womens-web-literacy
@soapdog
soapdog / gist:0130b10a84e9cd5328f8
Last active March 12, 2016 20:41
Gambiarra de Promise.
function makePromise() {
return new Promise(function(resolve, reject){
   setTimeout(function(){ resolve('hey!') }, 500);
});
}
var gambiwrap = function(p) {
console.log("Promessa não resolvida");
return p.then(function(r) {
Building repository 'multimedia:apps' cache ...................................................................................................[done]
Retrieving repository 'openSUSE:Tumbleweed' metadata ---------------------------------------------------------------------------------------------[/]
Warning: The gpg key signing file 'repomd.xml' has expired.
Repository: openSUSE:Tumbleweed
Key Name: openSUSE:Tumbleweed OBS Project <openSUSE:[email protected]>
Key Fingerprint: 56FE3F66 EE9AD664 DD8978DF 03FCF140 B367F5CD
Key Created: Mon 18 Feb 2013 02:09:00 PM BRT
Key Expires: Wed 29 Apr 2015 02:09:00 PM BRT (EXPIRED)
Rpm Name: gpg-pubkey-b367f5cd-5122602c
Retrieving repository 'openSUSE:Tumbleweed' metadata .....................................................
@soapdog
soapdog / resposta
Last active August 29, 2015 14:11
Resposta para materia ruim do meio bit
a respeito de: http://meiobit.com/305379/mozilla-firefox-pede-doacoes-para-se-manter-vivo-apos-contrato-com-google-expirar/#disqus_thread
Nossa que materia ruim.
Vamos lá, coisas erradas:
Primeiro a Mozilla é uma comunidade global de pessoas com objetivo de defender uma internet livre feita por usuários e para usuários. Essa comunidade se junta em uma fundação que por sua vez possui uma corporação. Ou seja, a estrutura é um pouco mais complexa que uma ONG.
Segundo, todo ano existe a campanha de doação para a Mozilla. Todo ano.