Skip to content

Instantly share code, notes, and snippets.

View stevenroose's full-sized avatar
👀
looking for a decentralized GitHub alternative

Steven Roose stevenroose

👀
looking for a decentralized GitHub alternative
View GitHub Profile
@stevenroose
stevenroose / build
Created January 26, 2020 03:31
OSX build file for Dino
#!/bin/sh
export CPATH="/usr/local/include:$CPATH"
export LDFLAGS="-L/usr/local/lib $LDFLAGS"
export PATH="/usr/local/opt/gettext/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/gettext/lib $LDFLAGS"
export CPPFLAGS="-I/usr/local/opt/gettext/include $CPPFLAGS"
export PATH="/usr/local/opt/icu4c/bin:$PATH"
export PATH="/usr/local/opt/icu4c/sbin:$PATH"
@stevenroose
stevenroose / playground.rs
Created January 21, 2020 17:07 — forked from rust-play/playground.rs
Code shared from the Rust Playground
pub fn fmt_value_in(&self, f: &mut fmt::Write, denom: Denomination) -> fmt::Result {
let sats = match self.as_sat().checked_abs() {
Some(sats) => sats,
None => {
assert_eq!(self.as_sats(), i64::min_value());
2147483648 // u64::max_value() - self.as_sat() as u64 + 1
}
};
fmt_satoshi_in(sats, self.is_negative(), f, denom)
}
@stevenroose
stevenroose / .rustfmt.toml
Created July 6, 2019 13:50
My rustfmt config
indent_style = "Block" # default
use_small_heuristics = "Off"
binop_separator = "Front" # default, unstable
combine_control_expr = true # default, unstable
comment_width = 80 # default, unstable
condense_wildcard_suffixes = false # default, unstable
control_brace_style = "AlwaysSameLine" # default, unstable
disable_all_formatting = false # default, unstable
error_on_line_overflow = false # default, unstable
error_on_unformatted = false # default, unstable
I0831 10:42:10.990529 ethdb/database.go:81] Allotted 1024MB cache and 1024 file handles to /home/ec2-user/quorum/data/geth/chaindata
I0831 10:42:11.001093 ethdb/database.go:174] closed db:/home/ec2-user/quorum/data/geth/chaindata
I0831 10:42:11.001591 node/node.go:179] instance: Geth/spain/v1.5.0-unstable-5dfdecef/linux/go1.7.5
I0831 10:42:11.001607 ethdb/database.go:81] Allotted 1024MB cache and 1024 file handles to /home/ec2-user/quorum/data/geth/chaindata
I0831 10:42:11.300842 eth/backend.go:177] Protocol Versions: [63 62], Network Id: 23778
I0831 10:42:11.301833 core/blockchain.go:225] Last header: #5 [2c58e314…] TD=655360
I0831 10:42:11.301851 core/blockchain.go:226] Last block: #5 [2c58e314…] TD=655360
I0831 10:42:11.301858 core/blockchain.go:227] Fast block: #5 [2c58e314…] TD=655360
I0831 10:42:11.306773 p2p/server.go:328] Starting Server
I0831 10:42:13.446734 p2p/discover/udp.go:217] Listening, enode://3a6d186dd98bb1f97a220b2bfaeffb3e8f12a90e1b9d2f0eed1500c82886a4428fabd65363f1ec5a90ad557e429e4e305a70
I0831 09:29:24.172981 ethdb/database.go:81] Allotted 1024MB cache and 1024 file handles to /home/ec2-user/quorum/data/geth/chaindata
I0831 09:29:24.191761 ethdb/database.go:174] closed db:/home/ec2-user/quorum/data/geth/chaindata
I0831 09:29:24.192316 node/node.go:179] instance: Geth/spain/v1.5.0-unstable/linux/go1.7.5
I0831 09:29:24.192331 ethdb/database.go:81] Allotted 1024MB cache and 1024 file handles to /home/ec2-user/quorum/data/geth/chaindata
I0831 09:29:24.489866 eth/backend.go:177] Protocol Versions: [63 62], Network Id: 23778
I0831 09:29:24.490935 core/blockchain.go:221] Last header: #16 [8a2fa843…] TD=2097152
I0831 09:29:24.490952 core/blockchain.go:222] Last block: #16 [8a2fa843…] TD=2097152
I0831 09:29:24.490959 core/blockchain.go:223] Fast block: #16 [8a2fa843…] TD=2097152
I0831 09:29:24.496615 p2p/server.go:328] Starting Server
I0831 09:29:26.604891 p2p/discover/udp.go:217] Listening, enode://3a6d186dd98bb1f97a220b2bfaeffb3e8f12a90e1b9d2f0eed1500c82886a4428fabd65363f1ec5a90ad557e429e4e305a700db
2017-08-22 22:26:25.877 [DBG] PEER: Sending inv (tx d2a9efe4dc5f6e37cb56083197d103761ea720ebf7d4c53e3304da3fcb8fac96) to 143.229.22.74:8333 (outbound)
2017-08-22 22:26:25.981 [DBG] PEER: Sending inv (tx d2a9efe4dc5f6e37cb56083197d103761ea720ebf7d4c53e3304da3fcb8fac96) to 99.104.139.90:8333 (outbound)
2017-08-22 22:26:26.247 [DBG] PEER: Received inv (tx 0414c7ef8f2439031f674498fe69c2cb2352c534f599a4db9c37ce79abfe663d) from 88.198.53.194:8333 (outbound)
2017-08-22 22:26:26.497 [DBG] PEER: Received inv (size 12) from 178.188.47.62:8333 (outbound)
2017-08-22 22:26:26.756 [DBG] PEER: Received inv (tx dd04bdc42068fe2e9d82ff7fd1b0019985a1007cc83513a4183a51681b01eacd) from 88.198.53.194:8333 (outbound)
2017-08-22 22:26:27.251 [DBG] PEER: Sending inv (tx d2a9efe4dc5f6e37cb56083197d103761ea720ebf7d4c53e3304da3fcb8fac96) to 178.188.47.62:8333 (outbound)
2017-08-22 22:26:27.676 [DBG] PEER: Received inv (size 4) from 178.188.47.62:8333 (outbound)
2017-08-22 22:26:28.696 [DBG] CMGR: Failed to connect to 46.105.62.121:8333
@stevenroose
stevenroose / pr.md
Created December 7, 2016 16:12 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

-rw-r--r-- 1 steven steven 27441 Nov 5 12:59 /home/steven/.local/share/xorg/Xorg.0.log
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 32767 x 32767
eDP1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 350mm x 190mm
3840x2160 60.00*+
3200x1800 60.00
2880x1620 60.00
2560x1440 60.00
2048x1536 60.00
1920x1440 60.00
1856x1392 60.01
1792x1344 60.01
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H Serial IO I2C Controller #0 (rev 31)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-H Serial IO I2C Controller #1 (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)