Skip to content

Instantly share code, notes, and snippets.

View marioidival's full-sized avatar
😶‍🌫️

Mario Idival marioidival

😶‍🌫️
  • Self Employed ;)
  • Campina Grande, Paraíba, Brazil
  • 17:21 (UTC -03:00)
  • X @marioidival
View GitHub Profile
import unittest
from pyramid import testing
from paste.deploy.loadwsgi import appconfig
from webtest import TestApp
from mock import Mock
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from app.db import Session
# Update System
sudo apt-get update && sudo apt-get dist-upgrade
# Install prerequisites
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev libncurses5-dev zlib1g zlib1g-dev sqlite3 libxslt-dev libxml2-dev libsqlite3-dev python-software-properties postfix curl libcurl3 libcurl3-gnutls libcurl4-openssl-dev
# Misc Utilities
sudo apt-get install ssh tmux vim git-core wget zip unzip mcrypt imagemagick libmagickwand-dev htop whois dnsutils powertop gparted zenmap terminator
# Set up git config
"""
=========================================================
Classe ObjetoJS: imitação simples de um objeto JavaScript
=========================================================
Uma instância é construída passando argumentos nomeados:
>>> o = ObjetoJS(z=33, x=11, y=22)
A representação textual de uma instância parece a chamada do

Porting an Existing Application to Pyramid

Porting an application across platforms is never particularly easy, nor very interesting. In fact, it's usually a terrible idea: in general, if it ain't broke, don't fix it. But sometimes you have to do it. Maybe a new platform has a feature you believe you can't live without, or the project scope is expanding in directions that make you feel like your original platform choice might not have been the best, or maybe it's just necessary to port for political reasons. Whatever.

.text
main: lui $8, 0x1001
addi $9, $0, 0x00ff00
addi $10, $0, 0xffff
addi $10, $10, 0xfff0
addi $11, $0, 0
sw $9, 0($8)
@marioidival
marioidival / 000_novice-problem.py
Created February 14, 2016 06:05 — forked from paulohrpinheiro/000_novice-problem.py
Primeira lista de exercícios do Test Driven Learning - 000_novice-python3
"""
Test Driven Learning Project.
Desenvolva TDD e programação com TDD e programação!
Módulo novice.
>>> __name__
'__main__'
"""
# Precisa de algum módulo? importe aqui:
@marioidival
marioidival / gulpfile.js
Created May 30, 2016 17:11 — forked from ktmud/gulpfile.js
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@marioidival
marioidival / app.js
Created June 22, 2016 00:51 — forked from tobyzerner/app.js
Mithril ES6 Components
import Component from './component';
class Widget extends Component {
init(ctrl) {
var props = this.props;
ctrl.counter = props.initialValue;
ctrl.increment = function() {
ctrl.counter++;
@marioidival
marioidival / concurrency-in-go.md
Created February 5, 2017 11:05 — forked from kachayev/concurrency-in-go.md
Channels Are Not Enough or Why Pipelining Is Not That Easy