Skip to content

Instantly share code, notes, and snippets.

View coldnight's full-sized avatar

Gary Wang coldnight

View GitHub Profile
#!/usr/bin/fish
# 抛硬币脚本
# Author: Lucien-X
# LastModified: 2019-02-22
# LastModified: 2019-03-20 by coldnight: porting to fish shell
# Usage: save this file to ~/.config/fish/functions/coin.fish
function coin
# Define backspace char
set -l BACKSPACE '\b\b'
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !plan9
#include "textflag.h"
// NOTE: Windows externalthreadhandler expects memclr to preserve DX.
#!/usr/bin/env python
# -*- coding:utf-8 -*-
""" """
from __future__ import absolute_import, print_function, division
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import MD5
from base64 import b64decode, b64encode
@gen.croutine
def _proxy(method, *args, **kwargs):
try:
ret = yield method(*args, **kwargs)
except ErrorYouWantCatch:
# logging or something else
ret = None
raise gen.Return(ret)
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : cold
# E-mail : wh_linux@126.com
# Date : 14/01/15 15:55:30
# Desc : 从豆瓣FM指定频道下载音乐
#
""" 从豆瓣FM上下载音乐
依赖命令:
@coldnight
coldnight / install.sh
Created January 14, 2014 06:03
Wine TM2013 automatic and solve font encode error.
#!/bin/bash -e
# Public Domain
: ${TMPREFIX:=$HOME/.winetm}
export WINEPREFIX="$TMPREFIX" WINEARCH=win32
export WINEDEBUG=fixme-all
env -u DISPLAY wineboot -u
winetricks -q riched20 mfc42