Skip to content

Instantly share code, notes, and snippets.

View nestoralvaro's full-sized avatar

Nestor nestoralvaro

View GitHub Profile
@nestoralvaro
nestoralvaro / gist:eacb85f37d8151d3e944e4f8cb5f4ad1
Created February 22, 2021 00:10 — forked from jtdp/gist:5443297
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@nestoralvaro
nestoralvaro / konamiCode.js
Created January 11, 2012 22:30
Snippet to detect Konami Code (and then do something)
/******************************************************************************
* This script detects the Konami code
* (Full Konami Code obtained from: http://en.wikipedia.org/wiki/Konami_Code)
* If the Konami code is detected the function called "startUpKonami" is invoked.
* You can do whatever you want on "startUpKonami". Right now this method just:
* - Detachs the Konami code detection (so no further detections can happen).
* - Invokes an external function.
*
* Note: In case the user presses keys like "shift", "caps lock", "Ctrl"...
* the code will have to be reentered from scratch