Skip to content

Instantly share code, notes, and snippets.

@jeduan
jeduan / Info.plist
Created Feb 9, 2020
PokeAPI Launchbar Action
View Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>com.spotify.client</string>
<key>LBTextInputTitle</key>
<string>Spotify</string>
<key>CFBundleIdentifier</key>
<string>com.kyleacarson.LaunchBar.action.SearchSpotify</string>
View satori_session_id.json
/s/San-Francisco--CA--United-States/all
{
"context": {
"timestamp": 1533239479462,
"source": "monorail",
"platform": "js",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36",
"version": "Unknown",
"bev": "1528237098_ZCHxUd7T3XDqi7CM",
"user_id": 129901766,
@jeduan
jeduan / apiTwitter.js
Last active Feb 23, 2016
Implementing Twitter's OAuth with only request
View apiTwitter.js
import request from 'request-promise'
import {parse as qsparse} from 'querystring'
import parse from 'co-body'
var post = request.defaults({json: true}).post
const TWITTER_KEY = ''
const TWITTER_SECRET = ''
const TWITTER_CALLBACK_URL = ''
export function * requestToken () {
@jeduan
jeduan / wifi-password.rb
Last active Aug 29, 2015
Homebrew Formulae for wifi-password
View wifi-password.rb
class WifiPassword < Formula
homepage "https://github.com/rauchg/wifi-password"
url "https://github.com/rauchg/wifi-password/archive/0.0.1.tar.gz"
version "0.0.1"
sha1 "7f92794a3a04762009a0c4525cbf2aa851002289"
def install
bin.install "wifi-password.sh" => "wifi-password"
end
end
@jeduan
jeduan / keybase.md
Last active Aug 29, 2015
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am jeduan on github.
  • I am jeduan (https://keybase.io/jeduan) on keybase.
  • I have a public key whose fingerprint is B70B 4F2F 27B9 18F5 4100 0EBE 6709 8BD2 7AEF CF68

To claim this, I am signing this object:

View db.js
var _ = require('underscore')
var config = require('../../config')
var mongoose = require('mongoose')
mongoose.connect(config.mongoUrl)
var db = mongoose.connection
mongoose.set('debug', !!config.mongoDebug)
db.on('error', function () {
return console.error.bind(console, '[mongo]: ')
})
@jeduan
jeduan / index.js
Created Mar 20, 2014
Error handling in express 4
View index.js
var express = require('express'),
logger = require('morgan')
var app = express();
var env = process.env.NODE_ENV || 'development';
var silent = env === 'test'
app.set('port', +process.env.PORT || 3000)
if (env === 'development') {
@jeduan
jeduan / database.lua
Created Jan 20, 2014
Creating a model that renders itself in corona
View database.lua
local modeloEspecial = ModeloEspecial:new {
name = "yogodb",
debug = settings.debugSql
}
local function migrate(schemaVersion, exec)
if schemaVersion < 1 then
log "migrating schema to v1"
local createPlayers = [[CREATE TABLE IF NOT EXISTS players (
@jeduan
jeduan / .bowerrc
Last active Dec 20, 2015
We use a bower based registry for our lua packages. These are the steps to get it working
View .bowerrc
{
"directory": "vendor",
"registry": "https://yogome-bower.herokuapp.com"
}
@jeduan
jeduan / segundamano.js
Last active Dec 20, 2015
Busqueda de departamentos con vanilla js
View segundamano.js
(function(){
//Configuration
var colonias = 'Roma Norte,Roma Sur,Cuauhtémoc,Juárez,Del Valle Norte,Narvarte Oriente,Narvarte Poniente,Letrán Valle,Del Valle Sur,Piedad Narvarte,Del Valle Centro,San Pedro de los Pinos,Vertiz Narvarte'.split(',');
var sinBusco = true;
var util = {
$$: function(selector) {
return [].slice.call(document.querySelectorAll(selector))
},