This file contains hidden or 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
#!/usr/bin/env node | |
var net = require('net'), | |
host = 'localhost', | |
start = 1, | |
end = 10000, | |
timeout = 15000; | |
while ( start <= end ) { | |
var port = start; |
This file contains hidden or 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
#!/usr/bin/env node | |
var fs = require('fs'), | |
vodevil = require('vodevil'); | |
var args = vodevil.sail( process.argv, '2:' ), | |
filecontent = fs.readFileSync( | |
args[0], | |
'utf-8' | |
), lines = filecontent.split('\n'); |
This file contains hidden or 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
Caro Senador Wellington Dias, | |
Viemos por meio deste abaixo-assinado manifestar nosso repúdio ao PLS - PROJETO DE LEI DO SENADO, Nº 607 de 2007, que busca regulamentar a profissão de Analista de | |
Sistemas no Brasil. | |
O principal motivo desta manifestação dá-se ao fato de a profissão não oferecer, inerentemente a ela, riscos à sociedade ou à condição humana - diferentemente da profissão | |
de médico cirurgião, que pode causar a morte de um paciente, ou de engenheiro civil, cujo mal projeto pode fazer com que uma construção desmorone e tire vidas, ou de um | |
advogado, que por não ser conhecedor das leis que fundamentam nosso país resultando no encarceramento de um cidadão inocente. Ao contrário destas profissões, são raras as | |
ocasiões em que a profissão de Analista de Sistemas tem influência crítica sobre a saúde humana ou o bem-estar social; Um dos melhores exemplos do baixo risco que a | |
profissão tem sobre a sociedade é o crescimento exponencial do mercado de soluções de Internet, onde é raro encontrar uma situação |
This file contains hidden or 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 feedparser as feed | |
config = { | |
'url': 'http://feeds.feedburner.com/techcrunch/startups?format=xml' | |
} | |
tech_startup = feed.parse(config['url']) | |
tech_startup['entries'].sort(key=lambda entrie: entrie['published'], | |
reverse=True) |
This file contains hidden or 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 canvas = document.getElementById('canvas1'); | |
var gl = canvas.getContext('webgl'); | |
canvas.width = newWidth; | |
canvas.height = newHeight; | |
gl.viewport(0, 0, canvas.width, canvas.height); |
This file contains hidden or 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
<html> | |
<head> | |
<title>Three.js rápida introdução</title> | |
<style> | |
canvas { width: 100%; height: 100% } | |
</style> | |
</head> | |
<body> | |
<script src="https://raw.github.com/mrdoob/three.js/master/build/three.js"></script> | |
<script> // O javascript vem aqui. </script> |
This file contains hidden or 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 scene = new THREE.Scene(); | |
var camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); | |
var renderer = new THREE.WebGLRenderer(); | |
renderer.setSize(window.innerWidth, window.innerHeight); | |
document.body.appendChild(renderer.domElement); |
This file contains hidden or 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 geometry = new THREE.CubeGeometry(1,1,1); | |
var material = new THREE.MeshBasicMaterial({color: 0x00ff00}); | |
var cube = new THREE.Mesh(geometry, material); | |
scene.add(cube); | |
camera.position.z = 5; |
This file contains hidden or 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
function render() { | |
requestAnimationFrame(render); | |
renderer.render(scene, camera); | |
} | |
render(); |
This file contains hidden or 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
<!doctype html><title>Minimal tQuery Page</title> | |
<script src="tquery-bundle.js"></script> | |
<body><script> | |
var world = tQuery.createWorld().boilerplate().start(); | |
var object = tQuery.createTorus().addTo(world); | |
</script></body> |