Skip to content

Instantly share code, notes, and snippets.

View duangsuse's full-sized avatar
👨‍💻
Leaning at school

duangsuse duangsuse

👨‍💻
Leaning at school
View GitHub Profile
@duangsuse
duangsuse / ununse.rb
Created October 4, 2018 10:15
Useless
# BiwaScheme VM Implementation
class BiwaVM
DEBUG = true
def dputs(m)
puts(m) if DEBUG
end
def initialize
@duangsuse
duangsuse / sexp-language.md
Created October 5, 2018 14:14
Sexp language reference

Sexp 程序设计语言 实现参考手册

Sexp 词法参考

Sexp 语言支持以下词条类型:

  • 字符串(支持 Heredoc 和 String interpolation)
  • 符号(symbol)
  • 字符(char)
  • 括号(方括号和圆括号)
@duangsuse
duangsuse / rest-in-peace.md
Created October 10, 2018 07:00
🌸 duangsuse - 永远怀念

duangsues.is_a? SaltedFish, [01.10.18 09:41] ( https://t.me/dsuse/7222

(其实昨天就回来了 放假整七天 因为昨天母上大人身体不好所以就没上线 据说今天去住院了 但愿人长久吧,虽然终究是「相逢有时,后会无期」的

@duangsuse
duangsuse / log1.xpm
Last active October 10, 2018 07:49
XPM Images - rest-in-peace
/* XPM */
static char *log1[] = {
/* columns rows colors chars-per-pixel */
"488 709 256 2 ",
" c #000000",
". c #01040B",
"X c #07080A",
"o c #020612",
"O c #030A14",
"+ c #030C1C",
@duangsuse
duangsuse / r2-debug-data.md
Created December 23, 2018 09:03
Radare 2 动态调试基本使用和基本 x86_64 汇编教程

Radare 2 动态调试 - 数据修改简易入门示范

以下部分内容直接从 Telegram 频道 duangsuse::Echo 拷贝,许可 CC-BY

PART 0x00 认识 Radare 2 逆向工程/取证框架

Radare 2 是著名的开源跨平台逆向分析框架,能够读取多种文件格式、支持很多动态分析调试器、有很多种前端(诸如基于 QtCutter)可以使用,也可以远程调试,支持插件并且 CLI 非常方便,能够进行许多厉害的静态分析。

Radare 2 堪比商业软件 IDA,R2 工程组里是有前端的,只不过他们比较喜欢推广 CLI Shell 而已,有些人可能认为 R2 没有前端只能用 CLI,实际上 R2 的 HTML 前端是非常友好的,也非常适合进行远程调试 这里 R2 在开源系逆向工程工具里的地位就好像类似于 KODI 在 Home Theater 软件里的地位了,自由软件一家独大

@duangsuse
duangsuse / LaTeXPrimer.pdf
Last active March 9, 2019 19:23
XeLaTeX 2 Primer - by example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
-- | Simple parser combinator
-- |
-- | copied from: https://ice1000.org/2017/07/26/HaskellParsers/
-- |
-- | Exposes
-- | Parser, satisfy, charItem, runParser, parse, chainl1, chainr1
module SimpleParserc
(Parser, runParser, parse, charItem, satisfy, chainl1, chainr1,
may, mayDefault, charP, elemP, stringP, tokenP, kwP, ws, ws0, binOp) where
@duangsuse
duangsuse / Json.hs
Created April 29, 2019 16:08
Json emitter in Haskell
-- | Naive JSON Emitter
module Json where
import Data.Map as Map
import Data.Char as Char
import Text.Printf
type NumJ = Double
@duangsuse
duangsuse / StupidReader.hs
Created May 19, 2019 08:58
Stupid Reader Monad Instance
{-# LANGUAGE ApplicativeDo #-}
newtype Reader t a = Reader { runReader :: t -> a }
instance Functor (Reader t) where
fmap f (Reader g) = Reader (\x -> f (g x))
instance Applicative (Reader t) where
pure = return
Reader f <*> Reader g = Reader $ \x -> (f x) (g x)
@duangsuse
duangsuse / Essay-Android-AsynchronousTaskAbstractoin.kt
Last active May 26, 2019 04:21
Essay: Android cancellable asynchronous task API abstractoin in Kotlin
package org.duangsuse.essay.android.Async
import android.os.AsyncTask
/**
* Job to be executed in worker thread, returning result with type `R`
*/
@FunctionalInterface
interface BackgroundJob<out R> {
/**