Start bitcoind
> bitcoind -regtest -datadir=./ -printtoconsole
Generate block chain
> bitcoin-cli -regtest -datadir=./ generate 101
I hereby claim:
To claim this, I am signing this object:
""" | |
Saves all webp images | |
""" | |
import io | |
from mitmproxy import http | |
def response(flow: http.HTTPFlow) -> None: | |
if flow.response.headers.get("content-type", "").startswith("image/webp"): | |
s = flow.response.content |
#!/usr/bin/env ruby | |
require 'JSON' | |
device_types = JSON.parse `xcrun simctl list -j devicetypes` | |
runtimes = JSON.parse `xcrun simctl list -j runtimes` | |
devices = JSON.parse `xcrun simctl list -j devices` | |
devices['devices'].each do |runtime, runtime_devices| | |
runtime_devices.each do |device| |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>distccd-rpi</string> | |
<key>Program</key> | |
<string>/Users/YOUR_USER_NAME/Scripts/launchd-distccd.sh</string> | |
<key>RunAtLoad</key> | |
<true/> |
### Keybase proof | |
I hereby claim: | |
* I am danielribeiro on github. | |
* I am danielrb (https://keybase.io/danielrb) on keybase. | |
* I have a public key whose fingerprint is C77E B7F0 DB78 7034 6923 A537 26A2 3CEA 2570 F304 | |
To claim this, I am signing this object: |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
Some notes on remote debugging mac builds on Travisci. It's hard to tell when something hangs what the cause it. Trial and error via commits is tedious. And on Mac , sometimes it's the gui asking for input. So I worked my around to get the access I needed for faster debugging a build. | |
################################################# | |
# Enable remote ssh access to travisci build for debugging | |
################################################# | |
# Add a key so we can login to travisci vm | |
- cat ssh/travisci.pub >> ~/.ssh/authorized_keys | |
- chmod 600 ssh/travisci | |
# Install netcat |
package main | |
import ( | |
"fmt" | |
) | |
type MyString string | |
func (s MyString) plusa() MyString { | |
return s + "a" |
require 'json' | |
require 'ostruct' | |
require 'pp' | |
str = { woo: [ 1, 2, 3], yay: { foo: true, bar: ["42", 2, {}] } }.to_json | |
pp JSON.parse(str, object_class: OpenStruct).yay.bar |