Skip to content

Instantly share code, notes, and snippets.

View sokcuri's full-sized avatar

Sokcuri sokcuri

View GitHub Profile
@gaeulbyul
gaeulbyul / tweetdeck-paste-image.user.js
Last active August 4, 2022 16:04
트윗덱(or 트윗덱 플레이어)에 이미지를 붙여넣기하여 업로드하는 스크립트.
// ==UserScript==
// @name TweetDeck Paste Image
// @namespace gaeulbyul.userscript
// @description 트윗덱에 클립보드 붙여넣기(Ctrl-V)로 이미지를 업로드하는 기능을 추가한다.
// @author Gaeulbyul
// @license WTFPL
// @include https://tweetdeck.twitter.com/
// @version 0.3b3
// @run-at document-end
// @grant none
@Aztorius
Aztorius / LoL-API.md
Last active April 29, 2020 15:11 — forked from themasch/doc.md
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 than a single chunk. They seem to be used to support skipping back in time or for spectators that join the game later.

@cucmberium
cucmberium / gist:8ca7f4a5c5ea5a8b6590
Last active May 11, 2019 16:40
Twitter poll api

twitterの投票

コード

var status = await tokens.Statuses.ShowAsync(id => 696716686381027328, include_cards => true, cards_platform => "Android-12");

https://api.twitter.com/1.1/statuses/show.json?id=696716686381027328&include_cards=true&cards_platform=Android-12

Twitter for AndroidのCK/CS

@bellbind
bellbind / pem.js
Last active September 17, 2024 20:19
[nodejs]Example of RSA usages with node-forge
// RSA with node-forge
"use strict";
// npm install node-forge
const forge = require("node-forge");
new Promise((f, r) => forge.pki.rsa.generateKeyPair(
2048, (err, pair) => err ? r(err) : f(pair)))
.then(keypair => {
const priv = keypair.privateKey;
@bishboria
bishboria / springer-free-maths-books.md
Last active May 10, 2025 04:28
Springer made a bunch of books available for free, these were the direct links
@esironal
esironal / codemirror-cdn.html
Last active November 3, 2024 09:40
Codemirror CDN
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Code Mirror CDN</title>
<link rel="stylesheet" href="http://esironal.github.io/cmtouch/lib/codemirror.css">
@alchen
alchen / editor.js
Created May 29, 2015 10:49
CodeMirror for Tweets
/*jslint latedef:false*/
'use strict';
var CodeMirror = require('codemirror');
var twitterText = require('twitter-text');
CodeMirror.defineSimpleMode = function(name, states) {
CodeMirror.defineMode(name, function(config) {
return CodeMirror.simpleMode(config, states);
});
@dsherret
dsherret / Using.ts
Last active October 26, 2023 13:30
Typescript Disposable (using statement)
// NOTE: This is now rolled up in a package and supports more scenarios: https://github.com/dsherret/using-statement
interface IDisposable {
dispose();
}
function using<T extends IDisposable>(resource: T, func: (resource: T) => void) {
try {
func(resource);
} finally {
@marocchino
marocchino / 094607.md
Last active July 19, 2022 14:25
ES6시대의 JavaScript

ES6시대의 JavaScript

안녕하세요. 사원사업부의 마루야마@h13i32maru입니다. 최근의 Web 프론트엔드의 변화는 매우 격렬해서, 조금 눈을 땐 사이에 점점 새로운 것이 나오고 있더라구요. 그런 격렬한 변화중 하나가 ES6이라는 차세대 JavaScript의 사양입니다. 이 ES6는 현재 재정중으로 집필시점에서는 Draft Rev31이 공개되어있습니다.

JavaScript는 ECMAScript(ECMA262)라는 사양을 기반으로 구현되어있습니다. 현재 모던한 Web 브라우저는 ECMAScript 5.1th Edition을 기반으로 한 JavaScript실행 엔진을 탑재하고 있습니다. 그리고 다음 버전인 ECMAScript 6th Edition이 현재 재정중으로, 약칭으로 ES6이라는 명칭이 사용되고 있습니다.

@tejacques
tejacques / asynceval.js
Last active October 24, 2020 07:17
Async Polyfill for javascript using eval and async function transform
/* Idea for allowing async-style functions in vanilla JS
* This transforms a function which uses await into a function
* which returns an ES6-style promise
*
* eval has the property of running the string of javascript
* with the same closure scope chain as the method it is called
* from, which is why it is necessary to call eval on the output
* of the async function, which returns a string representing
* the transformed function.
*/