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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
========================================================= | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from './component'; | |
class Widget extends Component { | |
init(ctrl) { | |
var props = this.props; | |
ctrl.counter = props.initialValue; | |
ctrl.increment = function() { | |
ctrl.counter++; |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
OlderNewer