Note: Consider using mitmproxy instead of Charles. There is better, more recent, documentation for using mitmproxy on Android.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
from jinja2 import Template | |
# git clone https://github.com/pingcap/tidb-docker-compose | |
# cd tidb-docker-compose | |
# git clone https://github.com/tennix/grafonnet-lib -b table | |
# python dashboard-to-jsonnet.py > pd.jsonnet | |
# jsonnet -J grafonnet-lib pd.jsonnet > config/dashboards/generated-pd.json | |
with open('config/dashboards/pd.json', 'r') as f: | |
data = json.load(f) |
WalletConnect Instant feature introduces the ability to make an ephemeral session that bypasses the process of session approval by the wallet, displaying to the user a call request to be signed from the Dapp right after scanning the QR Code. This is useful for one-time use-cases like payments, topping-up or withdrawals. This is still highly experimental and hasn't been published to the official library. A PoC to aggregate feedback on this feature!
Source code available at WalletConnect/walletconnect-monorepo on walletconnect-instant branch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package main is a sample macOS-app-bundling program to demonstrate how to | |
// automate the process described in this tutorial: | |
// | |
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
// | |
// Bundling the .app is the first thing it does, and creating the DMG is the | |
// second. Making the DMG is optional, and is only done if you provide | |
// the template DMG file, which you have to create beforehand. | |
// | |
// Example use: |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/net/websocket" | |
"log" | |
"net/rpc/jsonrpc" | |
) | |
// In a real project, these would be defined in a common file | |
type Args struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='org.eclipse.paho', module='mqtt-client', version='0.4.0') | |
import org.eclipse.paho.client.mqttv3.* | |
import org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence | |
String tmpDir = System.getProperty("java.io.tmpdir") | |
MqttDefaultFilePersistence dataStore = new MqttDefaultFilePersistence("${tmpDir}/mqtt") | |
//org | |
String org = 'myOrg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"log" | |
) | |
const ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
// The `json:"whatever"` bit is a way to tell the JSON |
NewerOlder