Skip to content

Instantly share code, notes, and snippets.

@oskarth
oskarth / Example output
Last active February 6, 2017 08:36
Script to generate Ledger entries that distribute a cost over several days
➜ finance git:(master) ✗ ./bin/distribute-cost Expenses:Misc:Buffer 150 USD 2017/02/01 28
Expenses:Misc:Buffer 0.20 USD ; [=2017/02/01]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/01]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/02]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/03]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/04]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/05]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/06]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/07]
Expenses:Misc:Buffer 5.35 USD ; [=2017/02/08]
@oskarth
oskarth / styles.js
Last active March 26, 2017 15:25
Location marker in React Native (using react-native-maps)
currentPosition: {
top: -8,
left: -8,
width: 16,
height: 16,
borderRadius: 16/2,
borderStyle: 'solid',
borderColor: "white",
borderWidth: 1.5,
@oskarth
oskarth / scratch.clj
Last active August 17, 2017 08:52
web3 RPC token balance
;; Clojurescript, connected to Ropsten via status-go:
(def address "0x8a501186861225be999c5bd31233cc276e7f1f1b")
(def contract "0x16b5017Bf4Fbf7bc9C84aADdCF7aEc2C4f8A73E2")
;; Sanity check
(.getBalance (.-eth web3) address cb) ;; => RESP: #object[BigNumber 1502432950000000002] ( nil )
;; Construct params in Clojure REPL (copy paste Commiteth relevant source, diff string format behavior):
(def params [{:to "0x16b5017Bf4Fbf7bc9C84aADdCF7aEc2C4f8A73E2", :data "0x70a082310000000000000000000000008a501186861225be999c5bd31233cc276e7f1f1b"} "latest"])
Incident Identifier: D5828A4D-85E3-4A6E-9351-861B42A569F2
CrashReporter Key: 23f53b240429b4c2db793118f4e6d5373f97f100
Hardware Model: iPhone8,1
Process: StatusIm [574]
Path: /private/var/containers/Bundle/Application/B9A993F8-5AE3-44FE-964F-6425048C8A82/StatusIm.app/StatusIm
Identifier: im.status.ethereum
Version: 1484.101 (0.9.11d28)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Aug 31 18:13:13 Oskars-iPhone installd(MobileSystemServices)[44] <Notice>: 0x16df1f000 -[MIClientConnection _doInstallationForURL:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/StatusIm.app" type Developer (LSInstallType = (null)) requested by lsd (pid 80)
Aug 31 18:13:20 Oskars-iPhone debugserver(FrontBoardServices)[519] <Error>: [FBSSystemService][0x9226] Request successful: <BSProcessHandle: 0x100722f60; StatusIm:521; valid: YES>
Aug 31 18:13:20 Oskars-iPhone debugserver[519] <Notice>: Got a connection, launched process /private/var/containers/Bundle/Application/B2F0BFE4-CF33-4BED-88B1-306194598AA3/StatusIm.app (pid = 521).
Aug 31 18:13:25 Oskars-iPhone kernel(Sandbox)[0] <Notice>: SandboxViolation: StatusIm(521) deny(1) sysctl-read kern.ipc.somaxconn
Aug 31 18:13:25 Oskars-iPhone CommCenter[74] <Notice>: Process with effective pid 521 real pid: 86 effective uuid: BEF4C1DA-1176-33F1-95A6-335BF138FB74 real uuid: 487D35EA-A279-341D-93D3-37C5B5F10D50 translated to procName: StatusIm and
Sep 2 12:37:23 Oskars-iPhone installd(MobileSystemServices)[44] <Notice>: 0x16dfcb000 -[MIClientConnection _doInstallationForURL:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/StatusIm.app_sparse.ipa" type Developer (LSInstallType = (null)) requested by lsd (pid 79)
Sep 2 12:37:44 Oskars-iPhone DTServiceHub(FrontBoardServices)[266] <Error>: [FBSSystemService][0x8689] Request successful: <BSProcessHandle: 0x103565ad0; StatusIm:370; valid: YES>
Sep 2 12:37:44 Oskars-iPhone kernel(Sandbox)[0] <Notice>: SandboxViolation: StatusIm(370) deny(1) sysctl-read kern.ipc.somaxconn
Sep 2 12:37:45 Oskars-iPhone StatusIm[370] <Notice>: [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. Read more: https://goo.gl/ctyzm8.
Sep 2 12:37:45 Oskars-iPhone StatusIm(CFNetwork)[370] <Notice>: Faulting in NSHTTPCookieStorage singleton
Sep 2 12:37:45 Oskars-iPhone StatusIm(CFNetwork)[370] <Notice>: Faulting in CFHTTPCo
@oskarth
oskarth / info-color-palette.html
Created October 14, 2017 10:52
Status color palette
<style>
body {
padding: 2em;
}
#container {
display: flex;
flex-wrap: wrap;
margin: 10;
justify-content: center;
align-items: center;
Oskars-MacBook-Pro:~ oskarth$ xcodebuild
2017-10-19 13:14:59.255 xcodebuild[31382:6240436] [MT] DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7ffe4ac42c10:'/Applications/Xcode8.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS4.0.sdk'>': SDK with name 'watchos4.0' being superceded by SDK with 'watchos4.0'.
2017-10-19 13:14:59.256 xcodebuild[31382:6240436] [MT] DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7ffe4ad227a0:'/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk'>': SDK with name 'iphonesimulator11.0' being superceded by SDK with 'iphonesimulator11.0'.
2017-10-19 13:14:59.257 xcodebuild[31382:6240436] [MT] DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7ffe4ad2a810:'/Applications/Xcode8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk'>': SDK with name 'macosx10.13' being superceded by SDK with 'macosx10.13'.
2017-10-19 13:14:59.258 xcodebu
0x2127edab5d08b1e11adf7ae4bae16c2b33fdf74a
Testing status-im.test.chat.events
Testing status-im.test.accounts.events
re-frame: overwriting :fx handler for: { ns: 'status-im.ui.screens.events',
name: 'init-store',
fqn: 'status-im.ui.screens.events/init-store',
_hash: 171106879,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096 }
re-frame: overwriting :fx handler for: { ns: 'status-im.ui.screens.accounts.events',