Skip to content

Instantly share code, notes, and snippets.

View jbueza's full-sized avatar

Jaime Bueza jbueza

View GitHub Profile
@themasch
themasch / doc.md
Last active October 31, 2023 05:41
unofficial docs of the LoL Spectator API

REST Service for LoL spectators

This is an unofficial, uncomplete and (pretty sure) wrong documentation of the RESTful service which powers the League of Legends spectator mode.

This documentation is desgined to be community driven and should be extended by everyone. If you find things missing, add them please!

How it works

Riot's spectator mode works by requesting replay data via HTTP form a service. The data is split in chunks which usually contain about 30 seconds of gameplay. Additionally there are key frames which seem to contain more information then a single chunk. They seem to be used to support

@dominicsayers
dominicsayers / phantomjs.md
Last active November 21, 2016 01:59
Installing PhantomJS on Ubuntu

(updated version of http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)

  1. export P=phantomjs-2.1.1-linux-x86_64
  2. cd /usr/local/share
  3. sudo curl -L -o $P.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/$P.tar.bz2
  4. sudo tar xvf $P.tar.bz2
  5. sudo ln --force -s /usr/local/share/$P /usr/local/share/phantomjs
  6. sudo ln --force -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
  7. phantomjs --version
@RobSpectre
RobSpectre / messages.py
Created September 27, 2012 19:09
Get the last n number of Sms Messages
from twilio.rest import TwilioRestClient
ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxx'
AUTH_TOKEN = 'yyyyyyyyyyyyyyyyyyyy'
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
messages = client.sms.messages.list()
for msg in messages:
@SyntaxC4
SyntaxC4 / .user.ini
Last active October 12, 2020 14:52
Web.config Starter for PHP on Windows Azure Web Sites
upload_max_filesize = 12M
log_errors=1
@tanepiper
tanepiper / gist:1887182
Created February 22, 2012 20:54 — forked from axelav/gist:1839777
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@tanepiper
tanepiper / gist:1884587
Created February 22, 2012 12:18
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+X delete line
Ctrl+↩ insert line after
Ctrl+⇧+↩ insert line before
Ctrl+⇧+↑ move line (or selection) up
@steveluscher
steveluscher / mojo_dojo_connector.js
Created August 11, 2011 16:56
A Mojo->Dojo connector; re-implement these methods in another library, and you can use Mojo 2.0 without Dojo.
/* Mojo-Dojo connector */
(function() {
if(typeof mojo == 'undefined') mojo = {};
mojo.addOnUnload = dojo.addOnUnload;
mojo.clone = dojo.clone;
mojo.config = dojo.config;
mojo.connect = dojo.connect;
mojo.declare = dojo.declare;
mojo.destroyElement = dojo._destroyElement;
@ded
ded / parallel.js
Created July 21, 2011 01:10
call multiple async methods in parallel and receive the result in a callback
function parallel() {
var args = Array.apply(null, arguments)
, callback = args.pop()
, returns = []
, len = 0
args.forEach(function (el, i) {
el(function () {
var a = Array.apply(null, arguments)
, e = a.shift()
if (e) return callback(e)
@ded
ded / virtual-hosts-connect.js
Created July 13, 2011 01:08
run multiple hosts (domains) on a single node process
var connect = require('connect')
, app = require('./app')
, app2 = require('./app2')
connect(
connect.vhost('dustindiaz.com', app)
, connect.vhost('foobar.dustindiaz.com', app2)
).listen(3000)
@tj
tj / in.luna
Created July 9, 2011 05:10
luna -> js, just for fun since it's trivial to output js
express = require('express')
app = express createServer()
app get('/'): req res next
return res send('<p>Hello</p>') if req accepts('html')
return res send('Hello') if req accepts('text')
next()
app listen(3000)
console log('Express app started on port 3000')