Skip to content

Instantly share code, notes, and snippets.

View samueltcsantos's full-sized avatar

Samuel Santos samueltcsantos

  • Signove Tecnologia S/A
  • Campina Grande, PB-Brazil
View GitHub Profile
<html>
<head>
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="http://localhost/arbor/lib/arbor.js" ></script>
<script language="javascript" type="text/javascript" src="http://localhost/arbor/demos/_/graphics.js" ></script>
<script language="javascript" type="text/javascript" src="http://localhost/arbor/demos/halfviz/src/renderer.js" ></script>
</head>
<body>
<canvas id="viewport" width="800" height="600"></canvas>
<script language="javascript" type="text/javascript">
@sanchitgangwar
sanchitgangwar / snake.py
Created March 22, 2012 12:38
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@nealpoole
nealpoole / index.html
Last active February 22, 2017 21:49
Simple example code for displaying an Issuu widget with a thumbnail preview. Degrades gracefully if JS is not enabled.
<div id="issuu-widget">
</div>
<script type="text/javascript" src="/wp-includes/js/swfobject.js"></script>
<script type="text/javascript">
function loadIssuuWidget(result) {
var doc = result.response.docs[0];
var link = jQuery('<a />').attr({
href: 'http://issuu.com/browndailyherald/docs/' + doc.docname,
@mandiwise
mandiwise / Update remote repo
Last active April 17, 2024 07:41
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@PascalAnimateur
PascalAnimateur / bower.js
Created February 22, 2016 13:38
Configure grunt-bower-task with Sails.js (Bootstrap + jQuery as example)
/**
* Task to pull out specific files from bower packages.
*/
module.exports = function (grunt) {
grunt.config.set('bower', {
install: {
options: {
layout: function(type, component) {
return type;
},