Skip to content

Instantly share code, notes, and snippets.

@juanca
juanca / github_load_all_diffs.js
Created March 2, 2017 18:42
Github PR bookmarklet: Load all file diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
@shahril96
shahril96 / instagram-fetcher.php
Last active April 12, 2018 06:57
Simple Instagram media info fetcher
<?php
/*
* title : simple instagram info fetcher
*
* author : shahril
* receipant : afif zafri
* date : 29-dis-2015
*/
@1lann
1lann / replays.md
Last active April 24, 2023 09:06
Storing and playing back replays in League of Legends

Storing and playing back replays in League of Legends

How it works

When you spectate a game in League of Legends, you tell the client to use a HTTP server, and make HTTP requests to it to retrieve data in chunks which make up a game. But what if you could return back the exact same data at a later time, simulating the spectate but viewing it at anytime? That's the concept behind replays and that's how they work.

There is some behavior in the API which I do not fully understand yet, so there are if statements to catch these edge cases.

Current game information

Before you can even get the game's metadata, you'll need to retrieve necessary information for the game. This call is part of the official Riot Games API.

/observer-mode/rest/consumer/getSpectatorGameInfo/{platformId}/{summonerId}

import requests
from bs4 import BeautifulSoup
import json
Header={"Origin":"https://instagram.com"
,"Accept-Encoding":"gzip, deflate"
,"X-Instagram-AJAX":"1"
,"User-Agent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36"
,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"
,"Accept-Language":"en,zh-CN;q=0.8,zh;q=0.6"
@NitroXenon
NitroXenon / InternalLoLTimers
Last active August 29, 2015 14:20 — forked from davidzech/InternalLoLTimers
Curse voice jungle timer
using Coherent.UI.Binding;
using Curse.Companion.Scripting;
using Curse.CurseClient.Shared;
using Curse.Logging;
using Curse.Tools.LoL;
using EasyHook;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@franmontiel
franmontiel / PersistentCookieStore.java
Last active April 1, 2024 05:40
A persistent CookieStore implementation for use in Android with HTTPUrlConnection or OkHttp 2. -- For a OkHttp 3 persistent CookieJar implementation you can use this library: https://github.com/franmontiel/PersistentCookieJar
/*
* Copyright (c) 2015 Fran Montiel
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
@mid-kid
mid-kid / minecraft-chat-client.py
Last active February 27, 2024 14:36
Basic minecraft chat client written in Python.
#!/usr/bin/env python3
"""
Simple script that implements the minecraft protocol
to create a basic chat client for said game.
No encryption, no online mode, no parsing of chat messages.
I tried to make it as extendable as possible, so hack away.
PEP8 Note: Ignored E302 (2 newlines between functions)
"""
@davidzech
davidzech / InternalLoLTimers
Created April 23, 2014 02:36
Curses stuipd League of Legends hack
using Coherent.UI.Binding;
using Curse.Companion.Scripting;
using Curse.CurseClient.Shared;
using Curse.Logging;
using Curse.Tools.LoL;
using EasyHook;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@hallazzang
hallazzang / README.md
Last active March 25, 2023 02:40
How to make LOL(League of Legends) chat bot (in Python)

How to make LOL(League of Legends) chat bot

  1. Install xmpppy module for python. (Manually download it from Downloads Page or try easy_install xmpppy)
  2. Create a script file. (Ex. lol_echo_bot.py)
  3. Follow steps below.

Import xmpp.

#我的 Vim 指令筆記

##vim 的三種模式 ###模式

  • 輸入模式:輸入內文。
  • 指揮模式:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。
  • 執行模式:文件存檔,離開等等行為。

###常用模式的切換

  • 輸入模式 -> 指揮模式 : 鍵盤 Esc