Skip to content

Instantly share code, notes, and snippets.

View seandong's full-sized avatar
🎯
Focusing

seandong seandong

🎯
Focusing
View GitHub Profile
@pinheadmz
pinheadmz / bitcoind-regtest-taproot-address.md
Last active April 17, 2024 04:53
Use Bitcoin Core in regtest mode to generate a Taproot address

To start you need a master private key. For me, the easiest way to do this is with bcoin and its default wallet in regtest mode:

$ bwallet-cli mkwallet --mnemonic='zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' --id=zoo
$ bwallet-cli --id=zoo master
{
  "encrypted": false,
  "key": {
    "xprivkey": "tprv8ZgxMBicQKsPdCttbKDzsuDzypKyWMDfGbzR5YsQe3dnPg6B69PPEaxawUuaanULMtgA8Etd9DaqDVSEBSbScA9xTsdR8PRfPsJZwKS3dJQ"
  },
{
repository(owner: "facebook", name: "mention-bot") {
object(expression: "master") {
... on Commit {
blame(path: "cookieJar.js") {
ranges {
startingLine
endingLine
age
commit {
@ericboehs
ericboehs / upgrade_to_mysql57.sh
Last active March 8, 2018 09:11
Upgrading from MySQL 5.6 to 5.7 on OS X
mysql.server stop # kill the process if it fails
brew uninstall mysql56
brew update
brew install mysql
cp /usr/local/Cellar/mysql/5.7.12/support-files/my-default.cnf /usr/local/etc/my.cnf
brew services start mysql # don't run via tmux
mysql_upgrade -u root --force
brew services restart mysql # don't run via tmux
cd ~/Code/17hats/17hats
bundle exec gem uninstall -a mysql2; bundle install

Parse -> LeanCloud 文件迁移工具

注意:这个工具是用来导入到中国区节点的

依赖: gevent、requests

Ubuntu 可以 # apt-get install python-gevent python-requests

@aerickson
aerickson / PyCurlSSLFixOnUbuntu
Last active December 16, 2018 11:34
how to rebuild PyCurl against OpenSSL on Ubuntu (12-13+)
XBMC uses pycurl/libcurl to fetch stuff. YouTube requires the RC4
cipher that GnuTLS has removed for security reasons (or doesn't allow
it to be selected, or XBMC doesn't allow to specify the cipher...).
PyCurl linked against OpenSSL can take the RC4 argument and make the
Youtube plugin work (Ubuntu ships it linked against GnuTLS), so we
need to rebuild to make it work.
///
from: https://code.google.com/p/wfuzz/wiki/PyCurlSSLBug
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@planetoftheweb
planetoftheweb / boogrid.css
Created February 12, 2014 17:37
Responsive Image Grid and Boostrap Jumbotron
header .jumbotron {
background: url('http://planetoftheweb.com/images/bridge.jpg') no-repeat center center;
background-position: center center;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
@mikepfirrmann
mikepfirrmann / pretty-exception.rb
Created October 2, 2012 16:24
Print a prettier stack trace for Ruby exceptions
def colorize(text, color_code)
"\e[#{color_code}m#{text}\e[0m"
end
begin
# Here be dangerous things.
rescue => e
print "\r" << (' ' * 50) << "\n"
stacktrace = e.backtrace.map do |call|
if parts = call.match(/^(?<file>.+):(?<line>\d+):in `(?<code>.*)'$/)
@mimosz
mimosz / nginx.conf
Created August 31, 2012 01:59
nginx + unicorn + padrino on ubuntu
# sudo ln -s ~/nginx.conf unicorn.conf
upstream app_server {
server unix:/tmp/unicorn_padrino.sock fail_timeout=0;
}
server {
listen 80;
charset utf-8;
server_name db.innshine.com;
#import "SCListener.h" // Remember to link to AudioToolbox.framework.
// Start listening.
[[SCListener sharedListener] listen];
// Retrieve the average power.
[[SCListener sharedListener] averagePower];
// Retrieve the peak power.
[[SCListener sharedListener] peakPower];