Skip to content

Instantly share code, notes, and snippets.

View wmora's full-sized avatar

William Mora wmora

View GitHub Profile
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var assert = require('assert')
console.log('\n===========');
console.log(' mongoose version: %s', mongoose.version);
console.log('========\n\n');
mongoose.connect('localhost', 'testing_findAndModifyAddToSet');
@wmora
wmora / index.html
Created March 25, 2013 01:49
A CodePen by William Mora. 2D Transform Demo - A simple demo using the transform property.
<html>
<body>
<h1>Hover over the cricles and see what they do!</h1>
<div id="spinner">
<p>
I spin!
</p>
</div>
<div id="skewer">
<p>
@wmora
wmora / index.html
Created July 26, 2013 02:51
A CodePen by William Mora. Where am I? - Simple ajax call to demonstrate how to get a client's location using MercadoLibre's APIs
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet'/>
</head>
<body>
<h1>Where am I?</h1>
<input type='button' id='findme' value='Find me!'/>
<br /><br />
<div id='message'></div>
</body>
@wmora
wmora / gifit.sh
Created February 3, 2017 16:33
Script to create a gif as explained in: http://chrismessina.me/b/13913393/mov-to-gif
echo Setting up stuff
rm -fr ./pngs
rm -fr ./gifs
mkdir ./pngs
mkdir ./gifs
echo Chopping $1
ffmpeg -i $1 -r 5 ./pngs/out%04d.png
sips -s format gif pngs/*.png --out ./gifs
cd gifs
filename=$(echo $1 | cut -f 1 -d '.').gif
@wmora
wmora / aliases.zsh
Created September 6, 2018 19:58
ZSH aliases
alias fat='/usr/bin/du -s * .* | sort -n'
alias gcm='git commit -m'
alias glo='git log --oneline'
alias gco='git checkout'
alias gcb='git checkout -b'
alias gbd='git branch -D'

Keybase proof

I hereby claim:

  • I am wmora on github.
  • I am wmora (https://keybase.io/wmora) on keybase.
  • I have a public key ASA5VAyIaZeVrR4sUBv-h24l2-iA_Em0h4qhe_xkFjoiZQo

To claim this, I am signing this object:

@wmora
wmora / Smooch.json
Created December 11, 2018 22:45
Smooch.json
{
"6.11.2": "https://github.com/smooch/smooch-ios/releases/download/6.11.2/Smooch.framework.zip"
}
@wmora
wmora / Simple REST client in node.js
Last active May 11, 2020 22:51
This is a basic example of a GET call to an https server using node.js + express
//It's an express app, so make sure you download the dependencies
var express = require('express')
, http = require('http')
, https = require('https')
, path = require('path');
var app = express();
app.set('port', process.env.PORT || 8888);