Skip to content

Instantly share code, notes, and snippets.

Avatar
🖤

Cheng Shao TerrorJack

🖤
View GitHub Profile
View slack-expand-unread.js
setInterval(() => Array.from(document.getElementsByClassName("c-button")).filter(b => b.innerText.includes("New Message")).forEach(b => b.click()), 1000)
View Freer.hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_GHC -Wall #-}
module Freer where
import Control.Applicative
import Control.Monad
import Data.Sequence (Seq (..))
import GHC.Exts
View log.txt
This file has been truncated, but you can view the full file.
Version 2.3.1 x86_64
Compiled with:
- Cabal-3.0.1.0
- Glob-0.10.0
- StateVar-1.2
- aeson-1.4.7.1
- annotated-wl-pprint-0.7.0
- ansi-terminal-0.10.3
- ansi-wl-pprint-0.6.9
View mealy.hs
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StaticPointers #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wall #-}
import Control.Concurrent
import Control.Distributed.Closure
import Control.Monad
import Data.Binary
import qualified Data.ByteString.Lazy as LBS
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
RUN \
apt update && \
apt full-upgrade -y && \
apt install -y \
curl \
desktop-file-utils \
View gc-talk.html
<!DOCTYPE html>
<html>
<head>
<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="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0/css/reveal.css">
@TerrorJack
TerrorJack / git-move-files-in-subfolder.md
Created Dec 31, 2019 — forked from ajaegers/git-move-files-in-subfolder.md
Git: move files in an subfolder keeping history
View git-move-files-in-subfolder.md

Change structure of project folder with Git

I have this structure:

 project-folder/
     .git
     wp-admin/
     wp-content/
     wp-includes/
    .htaccess
@TerrorJack
TerrorJack / arm64.md
Created Dec 11, 2019 — forked from george-hawkins/arm64.md
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU
View arm64.md

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 https://cloud-images.ubuntu.com/releases/16.04/release/

Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/

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
You can’t perform that action at this time.