This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "React component": { | |
| "prefix": "rcc", | |
| "body": [ | |
| "import * as React from 'react';", | |
| "", | |
| "class ${TM_FILENAME_BASE} extends React.Component {", | |
| " public render() {", | |
| " return (", | |
| " <div>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as _ from 'lodash'; | |
| interface IAny { | |
| [x: string]: string | number; | |
| } | |
| export default function arrayDiff(oldArray: Array<IAny>, newArray: Array<IAny> ): object { | |
| const additions = _.differenceWith(newArray, oldArray, _.isEqual); | |
| const removals = _.differenceWith(oldArray, newArray, _.isEqual); | |
| return { additions, removals }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "outDir": "./build", | |
| "module": "commonjs", | |
| "target": "es6", | |
| "lib": ["es6"], | |
| "sourceMap": true, | |
| "moduleResolution": "node", | |
| "forceConsistentCasingInFileNames": true, | |
| "noImplicitReturns": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loadNewReplies(t) { | |
| if (updateRunning) return !1; | |
| if ($("#msg").is(":focus")) return autoupdate && (nextReplyUpdateTimeout = setTimeout(function () { | |
| loadNewReplies(t) | |
| }, 2e3)), !1; | |
| var e = $$(t).find(".answers .answer:last"); | |
| if (e.is("*")) var s = e.attr("id").replace("no", ""); | |
| else var s = 1; | |
| if (0 == t.length || 0 == s.length) return !1; | |
| updateRunning = !0, $.get(siteUrl + "/scripts/ajax/get_new_replies.php", { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function read_file (filename) | |
| input = io.open(filename, "r") -- Open this file with the read flag. | |
| if input ~= nil then | |
| io.input(input) -- Set the input that the io library will read from. | |
| input_content = io.read() -- Read the contents of the file. | |
| io.close(input) -- Close the file. | |
| end | |
| return input_content | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name OSRS Hiscores fix | |
| // @namespace http://google.com | |
| // @description Fixes OSRS hiscores layout | |
| // @include http://services.runescape.com/m=hiscore_oldschool*/* | |
| // @version 1.0 | |
| // @grant none | |
| // ==/UserScript== | |
| const categoryOrder = ['Clue Scrolls (all)', 'Bounty Hunter - Rogue', 'Bounty Hunter - Hunter', 'LMS - Rank']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as robot from 'robotjs'; | |
| import * as winctl from 'winctl'; | |
| import * as _ from 'lodash'; | |
| const typingSpeed = 350; // Chars in minute | |
| const solutions = [ | |
| ['play', 'pull door', 'remove pants', 'enter toilet', 'shit'], | |
| ['play', 'remove pants', 'shit'], | |
| ['play', 'shit'], | |
| ['play', 'pull door', 'enter toilet', 'shit'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as _ from 'lodash'; | |
| const jokuArray = [1,2,3,4,5]; | |
| function sleep(ms) { | |
| return new Promise(res => setTimeout(res, ms)); | |
| } | |
| async function main() { | |
| // await wörkkii |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| interface FormState { | |
| name: string; | |
| message: string; | |
| } | |
| class Form extends React.Component<{}, FormState> { | |
| constructor(props: {}) { | |
| super(props); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import re | |
| import requests | |
| import urllib2 | |
| from distutils.version import LooseVersion | |
| def urldecode(s): | |
| return urllib2.unquote(s).decode('utf8') |