Skip to content

Instantly share code, notes, and snippets.

Avatar
⚠️
I'll deal with issues and pull requests after Dec.20th.

Spencer Woo spencerwooo

⚠️
I'll deal with issues and pull requests after Dec.20th.
View GitHub Profile
@spencerwooo
spencerwooo / anaconda_multiuser_postinstall.sh
Last active Nov 25, 2020
GPU server maintainence scripts
View anaconda_multiuser_postinstall.sh
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# See: https://docs.anaconda.com/anaconda/install/multi-user/
echo "[➤] Multi-user installation for Anaconda >>>"
# Check for root access
if [ "$EUID" -ne 0 ]
then echo "[✘] Please run as root, exiting >>>"
exit
View keybase.md

Keybase proof

I hereby claim:

  • I am spencerwooo on github.
  • I am spencerwoo (https://keybase.io/spencerwoo) on keybase.
  • I have a public key ASCtXMcCY0UpKPF6NpoLlwJT3xXsD5nzunxF2ei4gBRBkgo

To claim this, I am signing this object:

@spencerwooo
spencerwooo / termiWidget.js
Last active Dec 3, 2020
🍋 TermiWidget - Terminal-like Widget for iOS 14, made with Scriptable.
View termiWidget.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: quote-right;
// Change these to your usernames!
const user = "spencer"
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E"
const telegram = "realSpencerWoo"
const github = "spencerwooo"
@spencerwooo
spencerwooo / ttrss-theme-black-two-column.css
Created Mar 13, 2020
Tiny Tiny RSS Black (Pink) Theme with two columns
View ttrss-theme-black-two-column.css
@import url("https://fonts.googleapis.com/css?family=Miriam+Libre:400,700|Rubik:400&display=swap");
a.title {
font-family: "Miriam Libre", Noto Sans CJK SC, Sarasa Gothic SC,
Microsoft YaHei, sans-serif, Apple Color Emoji, Segoe UI Emoji !important;
}
#content-wrap#content-wrap .content,
#content-wrap#content-wrap .content-inner,
#feedTree,
body {
font-family: rubik, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica,
@spencerwooo
spencerwooo / ttrss-theme.css
Last active Apr 23, 2020
Tiny Tiny RSS Pink-Feedly Theme
View ttrss-theme.css
@import url(https://fonts.googleapis.com/css?family=Miriam+Libre:400,700&display=swap);
a.title {
font-family: 'Miriam Libre', Noto Sans CJK SC, Microsoft YaHei, sans-serif, Apple Color Emoji, Segoe UI Emoji!important
}
#content-wrap#content-wrap .content,
#content-wrap#content-wrap .content-inner,
#feedTree,
body {
font-family: Avenir Next, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, PingFang SC, Noto Sans CJK SC, Microsoft YaHei, sans-serif, Apple Color Emoji, Segoe UI Emoji!important
View 01-2.js
let credentialWorker = worker()
credentialWorker.generate(seed, currentCourseId, rynmParams)
.then(credentials => {
... // Do what ever you want with `credentials`
})
@spencerwooo
spencerwooo / 01-1.js
Last active Jul 27, 2019
Medium Code Highlights
View 01-1.js
const SHA256 = require('crypto-js/sha256') // 在哈希算法里面用到了 SHA256
const BigInteger = require('jsbn').BigInteger // 整个认证算法都需要大整数的支持
export function generate(seed, currentCourseId, rynmParams) {
let credentials = {}
... // Complicated algorithm
return credentials
}
@spencerwooo
spencerwooo / ohmy.ahk
Last active Dec 11, 2018
My autohotkey
View ohmy.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#q:: ; Windows + Q closes active window
WinGetTitle, Title, A
PostMessage, 0x112, 0xF060,,, %Title%
return
@spencerwooo
spencerwooo / hyper.js
Last active Dec 4, 2018
My hyper.js details
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'canary',
You can’t perform that action at this time.