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
| # pwn成功服務的次數 | |
| # cat states| jq -r '.pwns[] | .pwner as $p | .victim | "\($p)%\(.service)"' | sort | uniq -c | sort -n | grep -v NPC | |
| 1 我是狗汪汪%catftp | |
| 5 无名%catftp | |
| 10 Sigma%catftp | |
| 13 Pax.Mac Team%catftp | |
| 30 DISA%bluemine | |
| 50 DISA%catftp | |
| 54 Light4Freedom%catftp |
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 166.111.227.253 | |
| // @namespace https://github.com/MaskRay | |
| // @version 0.0.1 | |
| // @description meow | |
| // @include http://166.111.227.253/* | |
| // ==/UserScript== | |
| ### |
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
| // 在 console 裏執行即可 | |
| // Generated by LiveScript 1.2.0 | |
| (function(){ | |
| var down; | |
| down = function(name){ | |
| var x$, xhr; | |
| x$ = xhr = new XMLHttpRequest; | |
| x$.responseType = 'document'; | |
| x$.onreadystatechange = function(){ | |
| var id, cpp, x$, a; |
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
| #include <functional> | |
| #include <cstdio> | |
| #include <map> | |
| using namespace std; | |
| template<class T> | |
| class A : public map<T, A<T> > { | |
| public: | |
| A() : x(T()) { } | |
| A &operator[](size_t i) { |
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
| module type Base = sig | |
| type ('x,'a) m | |
| val unit : 'a -> ('x,'a) m | |
| val bind : ('x,'a) m -> ('a -> ('x,'b) m) -> ('x,'b) m | |
| end | |
| module type BaseT = sig | |
| module W : Base | |
| type ('x,'a) m | |
| val lift : ('x,'a) W.m -> ('x,'a) m |
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
| let read_int _ = Scanf.bscanf Scanf.Scanning.stdib " %d" (fun x -> x) | |
| let flip f x y = f y x | |
| let euler_tour n es root = | |
| let dfn1 = Array.make n 0 | |
| and dfn2 = Array.make n 0 in | |
| let rec dfs i x = | |
| dfn1.(x) <- i; | |
| dfn2.(x) <- List.fold_left dfs (i+1) es.(x); | |
| dfn2.(x) |
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
| (* | |
| % WatLog test case: Insertion Sort | |
| [lt-n: a, b]. | |
| [lt-n: b, c]. | |
| [lt-n: c, d]. | |
| [lt-n: d, e]. | |
| % transitive closure on lt-n relation | |
| {([lt-n: #x, #y]) => [lt: #x, #y]}. |
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/ruby | |
| #encoding: utf-8 | |
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'rss' | |
| s = open('http://oars.tsinghua.edu.cn/zzh/30630.nsf/infobytime?openview').read | |
| m = Nokogiri.parse(s).xpath('//script/text()')[0].text.match(/(?<= location\.replace\(")[^"]*(?=")/) | |
| s = open("http://oars.tsinghua.edu.cn#{m[0]}").read | |
| s = s.force_encoding('gbk').encode 'utf-8' |
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
| let is_lower c = | |
| 'a' <= c && c <= 'z' | |
| type ast = | |
| | Lit of char | |
| | Star of ast | |
| | Cat of ast*ast | |
| | Or of ast*ast | |
| module Parser = struct |
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
| module Str = struct | |
| let implode l = | |
| let s = Bytes.make (List.length l) ' ' in | |
| List.iteri (fun i c -> Bytes.set s i c) l; | |
| s | |
| end | |
| module LazyList = struct | |
| type 'a node = Nil | Cons of 'a * 'a t | |
| and 'a t = 'a node Lazy.t |