Skip to content

Instantly share code, notes, and snippets.

View Colorfulstan's full-sized avatar

Jonas Krispin Colorfulstan

View GitHub Profile
Garena client (LeagueClient UX.exe)
D:/Garena/Games/32771/LeagueClient/LeagueClientUx.exe
"--locale=en_SG"
"--servers.chat.chat_host=sg1.chat.si.riotgames.com"
"--servers.lcds.lcds_host=prod.lol.garenanow.com"
"--servers.lcds.login_queue_url=https://lq.lol.garenanow.com/login-queue/rest/queues/lol"
"--region=SG"
"--parent-client=GarenaPC"
"--no-rads"
"--remoting-auth-token=kItBNgRIncu_Wn6Xgthi3w"
@Colorfulstan
Colorfulstan / gist:312d5f77187570245c9c654d39f9bdc6
Created January 22, 2019 10:06 — forked from AndrewRayCode/gist:825583
recursive read directory in node.js returning flattened list of files and directories
function readDir(start, callback) {
// Use lstat to resolve symlink if we are passed a symlink
fs.lstat(start, function(err, stat) {
if(err) {
return callback(err);
}
var found = {dirs: [], files: []},
total = 0,
processed = 0;
function isDir(abspath) {
# IPv6
##
## set default policies to let everything in
ip6tables --policy INPUT ACCEPT;
ip6tables --policy OUTPUT ACCEPT;
ip6tables --policy FORWARD ACCEPT;
##
## start fresh
@Colorfulstan
Colorfulstan / overwolf-mock-creation.md
Created November 23, 2018 12:41
Creating a mock for the overwolf object with function mocks
  1. open any overwolf window
  2. add stringify version that includes functions
function JSONstringifyWithFuncs(obj) {
  Object.prototype.toJSON = function() {
  var sobj = {}, i;
for (i in this)
if (this.hasOwnProperty(i))
sobj[i] = typeof this[i] == 'function' ?
this[i].toString() : this[i];
@Colorfulstan
Colorfulstan / iptables.sh
Created October 22, 2018 10:51 — forked from danibram/iptables.sh
Redirect 443,80 to 8443,8080 on ubuntu with persistence
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443
sudo sh -c "iptables-save > /etc/iptables.rules"
sudo apt-get install iptables-persistent
const livereload = require('livereload')
const server = livereload.createServer({
port: 35729 // default port for live-reload, change if needed
, exclusions: [
'.git/', '.svn/', '.hg/' // default exclusions
// adding Overwolf manifest bc it requires full APP reload in Dev-Tools anyways
, 'manifest.json'
]
});
server.watch(__dirname + "/Files")
@Colorfulstan
Colorfulstan / championSelectInfo.d.ts
Created June 28, 2017 16:05
Typescript typings for League of Legends lol-champ-select outputs in LeagueClient.log
interface ChampionSelectInfo {
actions: Array<ChampionSelectAction[]> // TODO: are there some times more then one ChampionSelectAction[] items?
bans: {
myTeamBans: any[] // TODO: typing
numBans: number
theirTeamBans: any[] // TODO: typing
}
ceremonials: any[] // TODO: what, why, how? - typing
chatDetails: {
/** @example
function enablePromises(app) {
app.run(["$rootScope",function ($rootScope) {
Promise.setScheduler(function (cb) {
$rootScope.$evalAsync(cb);
});
}]);
}
var app = angular.module('HelloApp', []);
@Colorfulstan
Colorfulstan / angular_element_from_dom.js
Created July 30, 2016 11:42
Grab Angular Service from DOM
angular.element(document.querySelector('body')).injector().get('MyService')