Skip to content

Instantly share code, notes, and snippets.

View liushooter's full-sized avatar

Shooter liushooter

View GitHub Profile
@liushooter
liushooter / python
Created August 29, 2016 09:51 — forked from 582033/python
多线程获取并验证代理
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re
import requests
import Queue
import threading
class Proxy():
def __init__(self, proxy_url, target_url, ver_keyword, timeout):
@liushooter
liushooter / 提问的智慧.md
Created August 2, 2016 03:12 — forked from zer4tul/提问的智慧.md
Simplified Chinese edition of "How To Ask Questions The Smart Way"
# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9
@liushooter
liushooter / colorpicker.c
Created June 10, 2016 12:29 — forked from lilydjwg/colorpicker.c
a simple colorpicker in GTK
//=====================================================================
// 拾取颜色并输出
// 返回值:
// 0 正常
// 1 被取消
// 2 语法错
//---------------------------------------------------------------------
#include<gtk/gtk.h>
#include<ctype.h>
//---------------------------------------------------------------------
@liushooter
liushooter / tgbot-ws.lua
Created June 2, 2016 07:02 — forked from k4ml/tgbot-ws.lua
telegram-bot webscript.io
local tg_token = 'your token'
if request.query['admin_command'] == 'setURL' and request.query['pass'] == 'xxx' then
local response = http.request {
url = 'https://api.telegram.org/bot' .. tg_token .. '/setWebhook',
params = {
url='https://demo-xxxx.webscript.io/script'
},
method='post',
}
@liushooter
liushooter / uninstall-haskell-osx.sh
Last active November 15, 2017 01:49 — forked from gatlin/uninstall-haskell-osx.sh
Uninstall Haskell from Mac OS X
#!/bin/bash
# source: http://www.haskell.org/pipermail/haskell-cafe/2011-March/090170.html
sudo rm -rf /Library/Frameworks/GHC.framework
sudo rm -rf /Library/Frameworks/HaskellPlatform.framework
sudo rm -rf /Library/Haskell
rm -rf .cabal
rm -rf .ghc
rm -rf ~/Library/Haskell
swagger: '2.0'
info:
title: OpenBazaar API
description: Let's make trade free
version: "1.0.0"
# the domain of the service
host: localhost
# array of all schemes that your API supports
schemes:
- http
@liushooter
liushooter / gist:8fc2f9e8ea87212631fbbdb217989b64
Created May 18, 2016 07:27 — forked from bkimble/gist:1365005
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
艾玛,居然那么多人有版权意识,还在那里为91维护,真是呵呵了。代码删了
@liushooter
liushooter / install_gui_application_darwin.sh
Created May 4, 2016 05:29 — forked from lambdalisue/install_gui_application_darwin.sh
Install Mac OS X Gui Application via Homebrew Cask
#!/usr/bin/env bash
#==============================================================================
# Install Mac OS X GUI Application via brew cask
#==============================================================================
brew cask install google-chrome
brew cask install thunderbird
brew cask install dropbox
brew cask install copy
brew cask install slack
brew cask install the-unarchiver