Skip to content

Instantly share code, notes, and snippets.

View ctgnauh's full-sized avatar

Tristan Huang ctgnauh

View GitHub Profile
@ctgnauh
ctgnauh / scanlines.css
Created May 18, 2023 04:23
Using CSS to Simulate Scan Lines
/* source: https://rekt.network/ */
/* filter */
.scanlines {
z-index: 900;
background: linear-gradient(rgba(18,16,16,0) 50%,rgba(0,0,0,0.25) 50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.03),rgba(0,0,255,0.06));
background-size: 100% 2px,3px 100%
}
/* animation */
@ctgnauh
ctgnauh / lazyInStrict.c
Created April 6, 2023 11:37
Short-circuiting operator in Strict Language
#include <stdio.h>
int firstFunction() {
printf("First Function\n");
return 0;
}
int secondFunctionWithArgumentOne(int one) {
printf("Second Function\n");
return one;
@ctgnauh
ctgnauh / ob-php.el
Last active February 27, 2023 07:44
org-babel functions for php evaluation
;;; ob-php.el --- org-babel functions for php evaluation
;; Copyright (C) Tristan Huang
;; Author: Tristan Huang
;; Keywords: literate programming, reproducible research
;; Homepage: https://orgmode.org
;; Version: 0.01
;;; License:
@ctgnauh
ctgnauh / flist_test.txt
Last active July 12, 2019 05:49
Edited
DOMAIN-KEYWORD,admarvel,REJECT
DOMAIN-KEYWORD,admaster,REJECT
DOMAIN-KEYWORD,adsage,REJECT
DOMAIN-KEYWORD,adsmogo,REJECT
DOMAIN-KEYWORD,adsrvmedia,REJECT
DOMAIN-KEYWORD,adwords,REJECT
DOMAIN-KEYWORD,adservice,REJECT
DOMAIN-KEYWORD,domob,REJECT
DOMAIN-KEYWORD,duomeng,REJECT
DOMAIN-KEYWORD,dwtrack,REJECT
import requests
from uuid import uuid4
import json
headers = {"X-GatewaySession":"[REDACTED]", "X-ClientVersion":'dev'}
data = {
"jsonrpc": '2.0',
"method": "Companion.initApp",
"params": {"locale": "en_US", "fallbackLocale": "en-GB"},
"id": str(uuid4())
@ctgnauh
ctgnauh / EAxpd.markdown
Created October 4, 2014 19:56
A Pen by Tristan Huang.
@ctgnauh
ctgnauh / mm_move.sh
Last active March 7, 2016 07:06
shell trash
#!/bin/sh
help()
{
cat << HELP
usage: mm [-h -v] file1 file2 file3 ... fileN
-d: DEBUG mode
-h: Print this message
HELP