Skip to content

Instantly share code, notes, and snippets.

View casprwang's full-sized avatar

Casper Wang casprwang

View GitHub Profile
@casprwang
casprwang / exports.js
Created May 29, 2017 22:01
node.exports
// exports.module
// hello.js
exports.log = () => { console.log('logging') }
// index.js
import log from './hello.js'
log.log()
@casprwang
casprwang / module.exports.js
Created May 29, 2017 21:56
module.exports
// module.exports
// index.js
module.exports = () => { console.log('ANONYMOUS') }
// hello.js
import log from './hello.js'
log()
-- disable alt-v for Adobe's built-in shortcut
function applicationWatcher(appName, eventType, appObject)
if (eventType == hs.application.watcher.activated) then
if (string.find(appName, 'iTerm')) then
for i,v in pairs(editting) do
v:disable()
end
-- editting.cD:disable()
else
for i,v in pairs(editting) do
days = {[0]="Sunday", [1]="Monday", "Tuesday", "Wednesday",
"Thursday", a="Friday", "Saturday"}
print(days[1]) -- Tuesday
print(days[0]) -- Sunday
12006 silly gunzTarPerm extractEntry error.js
12007 silly gunzTarPerm extractEntry render-template.js
12008 silly gunzTarPerm extractEntry progress-bar.js
12009 silly gunzTarPerm extractEntry index.js
12010 silly gunzTarPerm extractEntry spin.js
12011 silly gunzTarPerm extractEntry process.js
12012 silly gunzTarPerm extractEntry template-item.js
12013 silly gunzTarPerm extractEntry plumbing.js
12014 silly gunzTarPerm extractEntry set-immediate.js
12015 silly gunzTarPerm extractEntry wide-truncate.js
// const fetch = async () => {
// return new Promise ((resolve, reject) => {
// // reject('Oooops, somethign went wrong')
// resolve(`{"text": "some text"}`)
// })
// }
const fetch = () => {
return new Promise((resolve, reject) => {
resolve('a resolve')
@casprwang
casprwang / hash.py
Created April 13, 2017 23:54
hash.py
# Please put the Hash fils and Malware folder in the same directory, and run with python3 filename
# by Singh Prabhjot && Song Wang
import hashlib
import os
import fileinput
hash_list = []
for line in fileinput.input(['Hash']):
.square {
font-size: 5em;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
height: 200px;
width: 200px;
border: 4px solid black;
}
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
source ~/.zsh/basic.zsh
source ~/.zsh/function.zsh
source ~/.zsh/alias.zsh
source ~/.zsh/fzf.zsh
source ~/.zsh/zsh-interactive-cd.plugin.zsh