Skip to content

Instantly share code, notes, and snippets.

View map-generation.clj
(def TILES
{:floor {:type :floor
:blocking false
:opaque false
:glyph "."}
:wall {:type :wall
:blocking true
:opaque true
:glyph "#"}
View cljfmt config - Tonsky style
:cljfmt {:remove-consecutive-blank-lines? false
:indents ^:replace {#"^[-*+!?_a-zA-Z]" [[:inner 0]]}}
View WeiyunExporter.js
// ==UserScript==
// @name WeiyunExporter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.weiyun.com/disk*
// @grant none
// ==/UserScript==
View lsp message exmaple
Content-Length: 58
{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}
Content-Length: 52
{"jsonrpc":"2.0","method":"exit","params":{},"id":1}
View aria2.rb
class Aria2 < Formula
desc "Download with resuming and segmented downloading"
homepage "https://aria2.github.io/"
url "https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0.tar.xz"
sha256 "1e2b7fd08d6af228856e51c07173cfcf987528f1ac97e04c5af4a47642617dfd"
bottle do
cellar :any
sha256 "9cc5e04be8b0a58d1f2b60b8abfc636168edbf23e7018003c40f1dd6952aab0c" => :catalina
sha256 "761836ac608eb0a59d4a6f6065860c0e809ce454692e0937d9d0d89ad47f3ce4" => :mojave
View cherry-api urls
https://www.nytimes.com/svc/video/api/playlists
https://www.nytimes.com/svc/video/api/playlist/100000001637619
https://www.nytimes.com/svc/video/api/playlist/100000002148738
https://www.nytimes.com/svc/video/api/v3/playlist/100000001150263
https://www.nytimes.com/svc/video/api/v3/playlist/100000001775830
https://www.nytimes.com/svc/video/api/v3/playlist/100000002148738
https://www.nytimes.com/svc/video/api/v3/playlist/100000002420711
https://www.nytimes.com/svc/video/api/v3/playlist/100000002500298
https://www.nytimes.com/svc/video/api/v3/playlist/100000002797598
https://www.nytimes.com/svc/video/api/v3/playlist/100000003029080
View keybase.md

Keybase proof

I hereby claim:

  • I am markx on github.
  • I am markx (https://keybase.io/markx) on keybase.
  • I have a public key ASCnctcAu2m4b_QictI41mOoJ11QqJ4rrQ0Lq-5jDzjSwAo

To claim this, I am signing this object:

View step0.js
const readline = require('readline');
function READ(x) {
return x;
}
function EVAL(x) {
return x;
}
View tencent server domains
cd.ctfs.ftn.qq.com
disk.sz.ftn.qq.com
hz.ftn.qq.com
nj.disk.ftn.qq.com
sh.ctfs.ftn.qq.com
sz.ctfs.ftn.qq.com
tj.ctfs.ftn.qq.com
tj.disk.ftn.qq.com
xa.ctfs.ftn.qq.com
xa.tfs.ftn.qq.com
View query string uitl
/**
* Parse query string into an object.
*
* @method queryStringToObject
* @param {String} str Query string. Use the query string from URL if this parameter is not provided.
* @return {Object} Returns the object created from query string
*/
queryStringToObject: function (str) {
var i, pair;
var result = {};