Skip to content

Instantly share code, notes, and snippets.

Avatar

Samuel Santos samueltcsantos

View GitHub Profile
@samueltcsantos
samueltcsantos / Update remote repo
Created Aug 24, 2017 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
View Update remote repo
// 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
@samueltcsantos
samueltcsantos / bower.js
Created Dec 3, 2016 — forked from PascalAnimateur/bower.js
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;
},
@samueltcsantos
samueltcsantos / API.md
Created Dec 7, 2015 — forked from iros/API.md
Documenting your REST API
View API.md

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:

View index.html
<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,
View canvas.js
var canvas = document.getElementById('mycanvas');
var context = canvas.getContext('2d');
context.strokeStyle = '#0000ff';
context.lineWidth = 2;
context.beginPath();
context.fillStyle = '#00ff00'; //green
context.fill();
View snake.py
# 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)