Skip to content

Instantly share code, notes, and snippets.

View joesonw's full-sized avatar

Qiaosen (Joeson) Huang joesonw

View GitHub Profile

Keybase proof

I hereby claim:

  • I am joesonw on github.
  • I am joesonw (https://keybase.io/joesonw) on keybase.
  • I have a public key whose fingerprint is A615 5450 7FA7 665E 509C 508B 40CB C03F 8CC7 80F7

To claim this, I am signing this object:

@joesonw
joesonw / x.go
Created October 22, 2019 01:53
go#35031
package main
// #include "x.h"
import "C"
func main() {}
@joesonw
joesonw / stringarray.go
Created April 19, 2019 06:00
string array
import (
"encoding/json"
"strings"
)
type String struct {
isArray bool
stringVal string
arrayVal []string
@joesonw
joesonw / 修改答案.js
Last active November 28, 2017 05:52
垃圾知乎
/**
放chrome console里跑,
劳烦自己翻个页,然后复制跑一遍
**/
count = 0;
total = 0;
Array.from(document.getElementsByClassName('ContentItem')).map(item => {
var id = item.getAttribute('name');
total++;
fetch(`https://www.zhihu.com/api/v4/answers/${id}`, {
-- a quick LUA access script for nginx to check IP addresses against an
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403.
--
-- allows for a common blacklist to be shared between a bunch of nginx
-- web servers using a remote redis instance. lookups are cached for a
-- configurable period of time.
--
-- block an ip:
-- redis-cli SADD ip_blacklist 10.1.1.1
-- remove an ip:
@joesonw
joesonw / TEMPLATE.glsl
Last active December 13, 2016 05:52 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
void main() {
vec2 p = gl_FragCoord.xy / resolution.xy;
gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress);