- Install
xmpppy
module for python. (Manually download it from Downloads Page or tryeasy_install xmpppy
) - Create a script file. (Ex.
lol_echo_bot.py
) - Follow steps below.
Import
xmpp
.
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; |
xmpppy
module for python. (Manually download it from Downloads Page or try easy_install xmpppy
)lol_echo_bot.py
)Import
xmpp
.
import socket | |
import struct | |
import json | |
def unpack_varint(s): | |
d = 0 | |
for i in range(5): | |
b = ord(s.recv(1)) | |
d |= (b & 0x7F) << 7*i | |
if not b & 0x80: |
#!/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) | |
""" |
#我的 Vim 指令筆記
##vim 的三種模式 ###模式
輸入模式
:輸入內文。指揮模式
:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。執行模式
:文件存檔,離開等等行為。###常用模式的切換
Esc
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.
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}
Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.
This manual helps you create your own proxy with Python and mitmproxy/libmproxy. Mitmproxy ships with both a standalone command-line tool (mitmproxy
) and a Python library (libmproxy).
#!/usr/local/bin/perl | |
################################################################################ | |
# File: tedSubtitle.pl | |
# Desscription: Get ted talk's subtitle from TED.com | |
# and convert subtitle of TED video to SRT format(SubRip Subtitle File) | |
# Usage: ted.pl URL languageCode output.src | |
# Creator: Thinkhy | |
# Date: 2011.04.30 | |
# ChangeLog: 1 Add language code. [thinkhy 2011.05.06] | |
# 2 Read advertisement time from the parameter of introDuration in html. |
<?php | |
/* | |
* title : simple instagram info fetcher | |
* | |
* author : shahril | |
* receipant : afif zafri | |
* date : 29-dis-2015 | |
*/ |