Skip to content

Instantly share code, notes, and snippets.

View chuck-sys's full-sized avatar

Cheuk Yin Ng chuck-sys

View GitHub Profile
@chuck-sys
chuck-sys / jarvis.sh
Created April 24, 2018 04:51
Jarvis adapter for rofi popup windows
#!/usr/bin/env bash
jarvis <<- EOF
$@
quit
EOF
@chuck-sys
chuck-sys / unforce.js
Last active February 12, 2018 01:22
Unforce Download - A Greasemonkey script that removes force-download links from your moodle page.
// ==UserScript==
// @name Unforce Download
// @author chucksys
// @namespace https://gist.github.com/cheukyin699/a1eee44f3b76e365b842665d0a93b232
// @version 1
// @include https://learn.twu.ca/mod/assign/*
// ==/UserScript==
var links = document.getElementsByTagName("a");
for (let link of links) {
(ns human-readable)
(def quantities ["year" "day" "hour" "minute" "second"])
(defn quantisize [q n]
(if (= n 1)
[n q]
[n (str q "s")]))
(defn inter-last [v]
@chuck-sys
chuck-sys / pepcoilParser.pl
Last active March 16, 2017 16:29
Bioinformatics
##################################################################################
# DESCRIPTION : This program parses pepcoil output so that the file can be
# opened into an Excel spreadsheet
#
# USAGE :
#
# AUTHOR : Chris Hobbs
# DATE : December 28, 2013
#
####################################################################################
@chuck-sys
chuck-sys / music.bas
Created June 23, 2016 04:02
qbasic file that plays music
' FILE: MUSIC.BAS
CLS
SCREEN 13
PLAY "MB"
PLAY "T255" 'TEMPO: 255
MUSIC1$ = "O2 F8 F8 F+8 F8 G+8 G+8 F+8 F4 F8 F+8 F8 O3 C#8 C#8 O2 B8 A#8"
MUSIC2$ = "O2 F8 F8 F+8 F8 G+8 G+8 F+8 F4 F8 F+8 F8 O3 F8 F8 D#8 C#8"
' FLAG FOR WHICH STRING OF NOTES TO PLAY
@chuck-sys
chuck-sys / turret_test.py
Last active August 29, 2015 14:17
Turret Test
#!/usr/bin/env python
# File: turret_test.py
# Description: Some turret testing for tower defense games
import pygame, sys, math
from pygame.locals import *
pygame.init()
surface = pygame.display.set_mode((500, 500))
pygame.display.set_caption('Turret Test')
@chuck-sys
chuck-sys / lightning_test.py
Created March 24, 2015 02:16
Lightning effects testing
#!/usr/bin/env python
# File: lightning_test.py
# Description: Using pygame to test lightning effects to
# follow the mouse/cursor.
import pygame, sys, math, random
from pygame.locals import *
SIZE = (1000, 500)
HSIZE = [x/2 for x in SIZE]
MINDIST = 10 # The minimum distance to stop