Skip to content

Instantly share code, notes, and snippets.

View abraham's full-sized avatar
thanks a latte

Abraham Williams abraham

thanks a latte
View GitHub Profile
@KohnoseLami
KohnoseLami / key.md
Created September 9, 2020 09:44
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@getify
getify / 1.md
Last active January 17, 2020 16:35
A question about JS parameter scopes, and closures over them vs function scopes

I received a question about this snippet of code:

function def(first="oldValue" , second=function(){
         return first;
}){
        var first="updatedValue";
        console.log('inside',first);
        console.log('function',second());
}
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@robertsdionne
robertsdionne / deepdream-install.md
Last active February 15, 2021 16:07
Deepdream installation
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
@aras-p
aras-p / preprocessor_fun.h
Last active May 13, 2024 15:42
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@mthurman
mthurman / user_streams.md
Last active December 18, 2015 05:49
App.net User Streams Spec (BETA)

User Streaming

  1. Client makes authenticated connection to the user stream endpoint.

    Authentication in headers or query string.

    Endpoint: wss://stream-channel.app.net/stream/user (WebSocket) or https://stream-channel.app.net/stream/user (streaming HTTP).

    If authentication fails, etc., client will be disconnected immediately with the appropriate HTTP error code.

import mimetypes
import pprint
import requests # pip install requests
import simplejson as json
from os.path import basename, expanduser
base_url = 'https://alpha-api.app.net/stream/0'
token = 'USER ACCESS TOKEN'
image_path = 'PATH TO FILE'
@richard-flosi
richard-flosi / bottle-cors.py
Created September 26, 2012 16:55
Bottle with Cross-origin resource sharing (CORS)
"""
Example of setting up CORS with Bottle.py.
"""
from bottle import Bottle, request, response, run
app = Bottle()
@app.hook('after_request')
def enable_cors():
"""
@pamelafox
pamelafox / email_logger.py
Created September 15, 2011 17:52
Email Logging for App Engine
#!/usr/bin/env python
#
# based on XMPPLoggingHandler, Copyright 2011 Calvin Rien,
# based on ExceptionRecordHandler, Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0