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
@samueltcsantos
samueltcsantos / Update remote repo
Created August 24, 2017 17:40 — forked from mandiwise/Update remote repo
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
@samueltcsantos
samueltcsantos / bower.js
Created December 3, 2016 01:51 — forked from PascalAnimateur/bower.js
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;
},
@samueltcsantos
samueltcsantos / API.md
Created December 7, 2015 23:37 — forked from iros/API.md
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:

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