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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / elements.js
Created June 19, 2017 21:38
Testing mithril-bulma
import m from "mithril";
import Content from "../elements/content.js";
import Title from "../elements/title.js";
import Subtitle from "../elements/subtitle.js";
import Box from "../elements/box.js";
import Button from "../elements/button.js";
import Tag from "../elements/tag.js";
import Delete from "../elements/delete.js";
import Fa from "../elements/fa.js";
import Icon from "../elements/icon.js";
@soapdog
soapdog / btc.red
Created December 17, 2017 01:15
Calculo de rendimento em BTC na Walltime
Red [
Title: "LuiBTC"
Author: "Andre Garzia"
Needs: 'view
]
do %json.red
view [
title "LuiBTC"
@soapdog
soapdog / test.js
Created January 15, 2018 13:48
example of mutant
var h = require('mutant/html-element')
var Struct = require('mutant/struct')
var send = require('mutant/send')
var computed = require('mutant/computed')
var when = require('mutant/when')
var state = Struct({
text: 'Test',
color: 'red',
value: 0