Skip to content

Instantly share code, notes, and snippets.

View jneves's full-sized avatar

João Miguel Neves jneves

View GitHub Profile
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<!-- This software application is Twitter-Ware. If you like it,
use it, or have something to say, follow and tell me on Twitter
at @codemonkeyism
http://twitter.com/codemonkeyism
Blog at http://www.codemonkeyism.com
Webssite http://www.simple-kanban.com
See MIT license at bottom.
@jneves
jneves / gist:1259536
Created October 3, 2011 16:33
Codebits quiz 4 winning solution
with(A.getContext('2d'))new EventSource('events').onmessage=function(e){for(m in a=e.data.split(" "))fillStyle="rgb("+a[m],fillRect(m,o,1,1);o=a<'x'&&o+1}
@jneves
jneves / print.html
Created October 30, 2011 18:47
print version of dzslides
<!DOCTYPE html>
<meta charset="utf-8">
<title>The Title Of Your Presentation</title>
<!-- Your Slides -->
<!-- One section is one slide -->
<section>
<!-- This is the first slide -->
#! /usr/bin/env python
import string
line = "uhifjuhxzxfrrevuweyoj6578chwo91tyux386c09c794l5m85p99387591890"
alphabet = string.ascii_lowercase
digits = string.digits
num = 13
str=""
@jneves
jneves / alunos.html
Created November 7, 2011 16:43
Simple test of dados.gov.pt API
<html>
<head>
<title>Tutorial Dados.gov.pt!</title>
<script type="application/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="application/javascript">
function aminhafuncao(data) {
res = "<table><tr><th>DRE</th><th>Concelho</th><th>Número de Alunos</th></tr>";
for(row in data.d) {
res = res + "<tr><td>" + data.d[row].dre + "</td><td>" + data.d[row].concelho + "</td><td>" + data.d[row].total + "</td><tr>";;
}
@jneves
jneves / gist:3654732
Created September 6, 2012 10:51
Greasemonkey script
// ==UserScript==
// @name Hootsuite promoted tweets never more
// @namespace http://localhost
// @description Remove hootsuite promoted tweets
// @include https://hootsuite.com/dashboard*
// @version 1
// ==/UserScript==
function addCss(cssString) {
var head = document.getElementsByTagName('head')[0];
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
@jneves
jneves / gist:6d6043e76cb9c8d67d2d
Created May 9, 2015 12:04
convert_to_chromecast.sh
#! /bin/bash
# Configuration
ACCEPTED_CONTAINER_FORMATS=MPEG-4
ACCEPTED_VIDEO_FORMATS=AVC
ACCEPTED_VIDEO_PROFILES="High@L4.1 High@L4.0 High@L3.1"
ACCEPTED_AUDIO_FORMATS=AAC
DEBUG=0
# Just code, not configurable
@jneves
jneves / minecraft-in-education-resources.md
Created July 5, 2015 17:38
Resources for Minecraft use in Education
class User(DeclarativeBase):
__tablename__ = 'sys_user'
user_id = Column(Integer, autoincrement=True, primary_key=True)
email = Column(Unicode(100))
name = Column(Unicode(100))
class UserLog(DeclarativeBase):
__tablename__ = 'sys_user_log'