Skip to content

Instantly share code, notes, and snippets.

View wangjiezhe's full-sized avatar
🏠
Working from home

Jiezhe Wang wangjiezhe

🏠
Working from home
View GitHub Profile
@paulosuzart
paulosuzart / guess-client.rkt
Last active April 19, 2018 08:22
Guess game - two processes (racket)
#lang racket
(require racket/serialize)
(require racket/cmdline)
(require "./messages.rkt")
(define (rand-number pred ran)
(let loop ()
(let ([r (random ran)])
(if (pred r) (loop) r))))
#lang racket
(require net/http-client)
(require net/url)
(require json)
(require net/uri-codec)
(require racket/cmdline)
(define lg (make-logger 'currency-logger))
(current-logger lg)
@tvvocold
tvvocold / slides.fdzh.org - 在云端的泡泡糖
Last active May 5, 2017 15:49
slides.fdzh.org-请自定义文件名
<section data-background-transition='zoom' data-transition='concave' data-background='http://fdorg.qiniudn.com/galaxy-10996_1280.jpg' data-state='blackout'>
<h1>在云端的泡泡糖</h1>
<h4>slides.fdzh.org</h4>
<p>请按 空格 或点击 右下角方向键 继续演示...</p>
</section>
<section data-background-transition='zoom' data-transition='linear'>
<h2>如何使用?</h2>
<p>仅需 Fork 一份 Gist </p>
<a href='https://gist.github.com/tvvocold/30e2848f2ba2a294ab28'>https://gist.github.com/tvvocold/30e2848f2ba2a294ab28</a></p>
@joshuamiller
joshuamiller / flavor.rb
Last active March 23, 2017 22:35 — forked from ttscoff/flavor.rb
#!/usr/bin/ruby
# encoding: US-ASCII
# Convert a Markdown README to HTML with Github Flavored Markdown
# Github and Pygments styles are included in the output
#
# Requirements: json gem (`gem install json`)
#
# Input: STDIN or filename
# Output: STDOUT
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
import requests
from db import db
"""
The Douban Group API which not display on http://developers.douban.com/wiki/?title=api_v2
Base url: https://api.douban.com/v2
Group info: /group/:id
@wangjiezhe
wangjiezhe / unzip3_gbk.py
Last active February 17, 2021 14:00
解决zip文件中文乱码问题
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
unzip3_gbk.py: Deal with zip files using encoding GB2312/GBK/GB18030
"""
import os
# import sys
import argparse
import zipfile
# LaTeX Files
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
@likewhoa
likewhoa / ecatalyst.sh
Created April 27, 2014 01:58
A script that allows you to chroot into a failed catalyst environment to fix errors manually.
#!/bin/bash
# Help menu
print_help() {
cat <<-HELP
Arguments:
--spec - --spec=stage1.spec (default)
--config - --config=/etc/catalyst.conf (default)