Skip to content

Instantly share code, notes, and snippets.

@jcohen
jcohen / output
Created August 7, 2012 22:25
Upload photos using the Flickr API from node (and Mikeal's request using oauth and multipart)
$ time node upload.js
Error: null
Body: <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<photoid>7735964772</photoid>
</rsp>
real 0m5.517s
user 0m0.106s
@supertowers
supertowers / gist:4052297
Created November 10, 2012 20:02
Oauth example for node js
var express = require('express');
var app = express();
app.use( express.cookieParser() );
app.use( express.session( { secret: 'blahblahblah' } ) );
var OAuth= require('oauth').OAuth;
@andrew-aladev
andrew-aladev / package.json
Created November 21, 2012 09:52
share picture with twitter and flickr
{
"name": "oauth-shares",
"description": "oauth twitter and flickr shares integration",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x",
"oauth": "0.9.x"
}
}
@undoZen
undoZen / private.xml
Last active December 16, 2015 12:08
my private.xml file for KeyRemap4MacBook
<?xml version="1.0"?>
<root><!--
<item>
<name>Backquote to CapsLock and Escape to Backquote</name>
<identifier>private.swap_space_and_tab</identifier>
<autogen>__KeyToKey__ KeyCode::ESCAPE, KeyCode::BACKQUOTE</autogen>
<autogen>__KeyToKey__ KeyCode::BACKQUOTE, KeyCode::CAPSLOCK</autogen>
</item>
<item>
<name>Switch Input Source</name>
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 22, 2025 08:10
A badass list of frontend development resources I collected over time.
@ogrrd
ogrrd / Mac Dev Setup.md
Last active November 12, 2020 22:16
Installing nginx, PHP and MySQL on OS X Mavericks

Installing a Web Developer setup on OS X Mavericks

Install Command Line Tools

This is a requirement for brew in the next step. You can install XCode and then install Command Line Tools through the XCode preferences, or you can install just the Command Line Tools.

Install Command Line Tools

$ xcode-select --install
@tivac
tivac / source-maps.js
Created July 1, 2013 21:15
Trying to get escodegen's source-map generation to work
var esprima = require("esprima"),
esmangle = require("esmangle"),
escodegen = require("escodegen"),
src = "var fooga = \"wooga\";\n\nconsole.log(fooga);\n\nfooga += 1;",
ast, result;
ast = esprima.parse(src, {
loc : true,
tokens : true,
@ourai
ourai / alibaba_campus_quiz3.md
Last active July 24, 2018 07:32
阿里巴巴集团 2014 校园招聘攻略

智勇大闯关第三季

8月20日,阿里校园招聘前端岗位的在线笔试将统一开始。在这之前,我们先玩一下热身赛吧! http://ued.taobao.com/quiz3/ 截至8月18日11:00之前成功通关并且表现优异的同学,将有机会收到我们的惊喜邮件!

以上是阿里巴巴集团校园招聘的某一条微博的内容。

虽然我早已不是学生,本着好奇心也要玩一玩此游戏!经过几个小时的奋斗,我看到了美女,但不知道那是不是 True Ending。也许很多人把游戏通关之后就不玩不去探索了,可我不一样!我玩游戏向来都是要尽量把所有隐藏要素都挖掘出来才算结束。

正是因为知道结果,才有可能去优化过程,一个工程师的职责难道不正是这个么?“如何自动化、智能地去过每一关”的想法让我的血液稍微沸腾了起来。又经过几个小时的编码及测试,自我感觉已经把“隐藏要素”挖得差不多了。现将各个关卡的过关要点及自动获取过关条件的 JavaScript 脚本放出来。

@Shiti
Shiti / lightbox.css
Last active July 26, 2018 07:05
AngularJS Lightbox directive
.modal {
width: 800px;
left: 40%;
}
.lightbox-content {
width: 100%;
}
.lightbox-image {
@infostreams
infostreams / bindFirst
Last active April 5, 2017 07:49
ensures a handler is run before any other registered handlers, independent of the order in which they were bound. Requires jQuery > 1.7
$.fn.bindFirst = function(which, handler) {
// ensures a handler is run before any other registered handlers,
// independent of the order in which they were bound
var $el = $(this);
$el.unbind(which, handler);
$el.bind(which, handler);
var events = $._data($el[0]).events;
var registered = events[which];
registered.unshift(registered.pop());