Skip to content

Instantly share code, notes, and snippets.


Samuel Santos samueltcsantos

View GitHub Profile
PascalAnimateur / bower.js
Created February 22, 2016 13:38
Configure grunt-bower-task with Sails.js (Bootstrap + jQuery as example)
View bower.js
* 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;
mandiwise / Update remote repo
Last active May 26, 2023 02:21
Transfer repo from Bitbucket to Github
View Update remote repo
// Reference:
// See also:
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin
$ git push origin master
$ git remote rm bitbucket
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.
View index.html
<div id="issuu-widget">
<script type="text/javascript" src="/wp-includes/js/swfobject.js"></script>
<script type="text/javascript">
function loadIssuuWidget(result) {
var doc =[0];
var link = jQuery('<a />').attr({
href: '' + doc.docname,
iros /
Created August 22, 2012 14:42
Documenting your REST API


<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:

sanchitgangwar /
Created March 22, 2012 12:38
Snakes Game using Python
# 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
win = curses.newwin(20, 60, 0, 0)
View arborDemoStep1.html
<script language="javascript" type="text/javascript" src=""></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>
<canvas id="viewport" width="800" height="600"></canvas>
<script language="javascript" type="text/javascript">