Skip to content

Instantly share code, notes, and snippets.


Shao Cheng TerrorJack

Block or report user

Report or block TerrorJack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View T.hs
{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -Wall -O2 -threaded -rtsopts "-with-rtsopts=-A64m -n2m -I0 -qg" #-}
module T where
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.IORef
View baidupcs.Dockerfile
FROM ubuntu:bionic
ARG DEBIAN_FRONTEND=noninteractive
apt update && \
apt full-upgrade -y && \
apt install -y \
curl \
desktop-file-utils \
View gc-talk.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>A tour into GHC’s garbage collection</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="">
TerrorJack /
Created Dec 31, 2019 — forked from ajaegers/
Git: move files in an subfolder keeping history

Change structure of project folder with Git

I have this structure:

TerrorJack /
Created Dec 11, 2019 — forked from george-hawkins/
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU

QEMU arm64 cloud server emulation

This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.

Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from

Download the UEFI firmware image QEMU_EFI.fd from

Determine your current username and get your current ssh public key:

View jsval-gc.hs
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall -O2 #-}
import Data.Foldable
import GHC.Exts
import GHC.Types
import System.Mem
#!/usr/bin/env python3
from io import BytesIO
import json
import os
from sys import argv
import tarfile
from urllib.request import urlopen
View cont.hs
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString as BS
import qualified Data.ByteString.Unsafe as BS
import Data.Char
import Data.Time.Clock.POSIX
import qualified DynFlags as GHC
import Foreign
import qualified GHC
import GHC.ForeignPtr
View v8-options.txt
SSE3=1 SSSE3=1 SSE4_1=1 SSE4_2=1 SAHF=1 AVX=1 FMA3=1 BMI1=1 BMI2=1 LZCNT=1 POPCNT=1 ATOM=0
shell [options] [--shell] [<file>...]
d8 [options] [-e <string>] [--shell] [[--module] <file>...]
-e execute a string in V8
--shell run an interactive JavaScript shell
--module execute a file as a JavaScript module
Note: the --module option is implicitly enabled for *.mjs files.
TerrorJack / haproxy.cfg
Created Oct 3, 2019 — forked from cmer/haproxy.cfg
Simple, no bullshit TCP port forwarding using HAProxy
View haproxy.cfg
listen l1
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1
You can’t perform that action at this time.