Skip to content

Instantly share code, notes, and snippets.

View jesusgollonet's full-sized avatar

Jesús Gollonet jesusgollonet

View GitHub Profile
@jesusgollonet
jesusgollonet / index.js
Last active May 3, 2024 08:41
tic tac toe recurse center
const readline = require("readline");
const validLetters = "abc";
const validNumbers = "123";
const circle = "O";
const cross = "X";
let turn = circle;
let state = [
'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
if (request.uri === '/' || request.uri.indexOf('.') === -1){
console.log(JSON.stringify(request));
if (isDesktopOrTablet(headers)){
console.log('desktop or tablet')

Keybase proof

I hereby claim:

  • I am jesusgollonet on github.
  • I am jesusgollonet (https://keybase.io/jesusgollonet) on keybase.
  • I have a public key ASC6arQE5qua1tFTxSHWuqGmWg7g5VIeyRdN76NCr1-qxAo

To claim this, I am signing this object:

@jesusgollonet
jesusgollonet / gist:3ce42498a2c1c9c4252f
Created July 3, 2015 10:45
Use F12 to toggle between vim and terminal
" in you .vimrc
map <F12> <C-z>
# in your .zshrc
bindkey -s '^[[24~' 'fg\n'
@jesusgollonet
jesusgollonet / kill_yo.sh
Created August 11, 2014 12:02
kill the yeoman server
kill_yo () {
ps | grep 'grunt serve' | grep -v 'grep' | sed 's/^ *//' | cut -d ' ' -f1 | xargs kill -15
}
@jesusgollonet
jesusgollonet / svn_add_untracked.sh
Last active August 29, 2015 13:56
get untracked subversion files as a list
# given a list of untracked svn files like
# ? trunk/content/build/backend/bin
# ? trunk/content/build/backend/ban
# ? trunk/content/build/backend/bun
# this will create a list out of them, then svn add them
# svn add trunk/content/build/backend/bin trunk/content/build/backend/ban trunk/content/build/backend/bun
svn_add_untracked(){
svn status | grep '^?.*' | sed 's/? //' | xargs svn add
@jesusgollonet
jesusgollonet / handlebars-compile-dir.rb
Last active December 17, 2015 17:09
convert all files in current directory to handlebars templates
# i know, could do that in bash
Dir.glob("#{Dir.pwd}/*").each do |f|
system("handlebars #{f} -f #{Dir.pwd}/#{File.basename(f, ".*")}.js ")
end
@jesusgollonet
jesusgollonet / gist:5451477
Created April 24, 2013 11:31
sox: convert a directory of aiff files to wav
for i in `ls *.aiff`; do echo -e "$i"; sox $i $i.wav; echo -e "$i.wav"; done;
@jesusgollonet
jesusgollonet / gist:4628507
Created January 24, 2013 22:10
sublime preferences
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
],
"folder_exclude_patterns": [".sass-cache"],
"file_exclude_patterns": ["*.woff", "*.ttf", "*.eot",".DS_Store"]
@jesusgollonet
jesusgollonet / gist:2067556
Created March 18, 2012 01:31
ofxOpenCv project.xconfig
OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_PATH)/addons/ofxOpenCv/libs/opencv/lib/osx/opencv.a
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OF_PATH)/addons/ofxOpenCv/src $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include/opencv