Skip to content

Instantly share code, notes, and snippets.

View clockfort's full-sized avatar
✔️

Chris Lockfort clockfort

✔️
View GitHub Profile
@clockfort
clockfort / gist:4789976034dfa2db38e16bfe3631c1be
Last active May 10, 2019 21:08
log for atlasdb issue 3999
WARN [2019-05-09T21:07:47.271Z] com.palantir.atlasdb.keyvalue.cassandra.CassandraClientPoolingContainer: Error occurred talking to host '{}': {} (host: <redacted>-cassandra-20.<redacted>) (exception: com.palantir.atlasdb.keyvalue.api.InsufficientConsistencyException: This batch mutate operation requires ALL Cassandra nodes to be up and available.)
WARN [2019-05-09T21:07:48.644Z] com.palantir.atlasdb.keyvalue.cassandra.CassandraClientPool: Randomly redirected a query intended for host {} to {}. (previousHost: <redacted>-cassandra-20.<redacted>, randomHost: <redacted>-cassandra-21.<redacted>)
WARN [2019-05-09T21:07:48.645Z] com.palantir.atlasdb.keyvalue.cassandra.CassandraKeyValueService: A call to table(s) liveMigration.consensus_store failed with an exception. (0: liveMigration.consensus_store)
WARN [2019-05-09T21:07:48.645Z] com.palantir.atlasdb.keyvalue.cassandra.CassandraClientPoolingContainer: Not reusing resource {} due to {} of host {} (host: <redacted>-cassandra-21.<redacted>) (exception: com.palan
// @run-at document-start
var css = document.createElement("style")
css.type = "text/css"
css.innerHTML = "#content .description{ opacity: 0; } #content .description:hover { opacity: 0.5; }"
document.head.appendChild(css)
@clockfort
clockfort / Main.java
Created September 18, 2016 07:04
BinaryReverseGrayCodeRotaryEncoderGenerator
package com.clockfort;
import com.google.common.base.Joiner;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
@clockfort
clockfort / gist:6584317
Created September 16, 2013 18:10
I have scared NTP in submission. (and/or woke up its process with a signal)
clockfort@clockfort-linux:~$ minions db date
root@db1: Mon Sep 16 18:01:43 UTC 2013
root@db3: Mon Sep 16 18:01:46 UTC 2013
root@db4: Mon Sep 16 18:01:46 UTC 2013
root@db2: Mon Sep 16 18:01:46 UTC 2013
clockfort@clockfort-linux:~$ ssh root@db1 /etc/init.d/ntpd status
ntpd (pid 3018) is running...
clockfort@clockfort-linux:~$ minions db date
@clockfort
clockfort / gist:6470270
Created September 6, 2013 21:30
uhhhhh btrfs what are you doing btrfs stop
clockfort@jolt ~$ btrfs filesystem df /mnt/clockfort/
Data: total=6.24TB, used=6.05TB
System, DUP: total=32.00MB, used=736.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=30.00GB, used=13.83GB
clockfort@jolt ~$ df -h /mnt/clockfort/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_raid6_array-lv_clockfort
9.0T 6.1T 910G 88% /mnt/clockfort
@clockfort
clockfort / gist:6447201
Last active December 22, 2015 08:48
wtf btrfs resize my filesystem
root@jolt ~# btrfs fi df /mnt/clockfort
Data: total=6.34TB, used=6.34TB
System, DUP: total=32.00MB, used=768.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=38.00GB, used=14.75GB
root@jolt ~# btrfs fi resize max /mnt/clockfort/ && dmesg | tail -n 1
Resize '/mnt/clockfort/' of 'max'
btrfs: new size for /dev/mapper/vg_raid6_array-lv_clockfort is 8796093022208
@clockfort
clockfort / gist:6331037
Last active December 21, 2015 16:08
oneblox issues
4+0 records out
33554432 bytes (34 MB) copied, 815.963 s, 41.1 kB/s
4+0 records in
4+0 records out
33554432 bytes (34 MB) copied, 795.58 s, 42.2 kB/s
4+0 records in
4+0 records out
33554432 bytes (34 MB) copied, 829.277 s, 40.5 kB/s
4+0 records in
4+0 records out
@clockfort
clockfort / haskell squares
Created July 16, 2013 18:38
show gambogi powers in haskell and their relative speed in square case
Prelude> sum $ map (\n -> n*n) [1..1024*1024*10]
384307223177865461760
it :: Integer
(5.20 secs, 3756611120 bytes)
Prelude> sum $ map (\n -> n**2) [1..1024*1024*10]
3.843072231783101e20
it :: Double
(5.65 secs, 3960924248 bytes)
Prelude> sum $ map (\n -> n^2) [1..1024*1024*10]
384307223177865461760
@clockfort
clockfort / ghci_log.txt
Last active December 18, 2015 08:29
reddit r/codes/
[Prelude] λ> import Data.Char
[Prelude Data.Char] λ> let fibs = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
[Prelude Data.Char] λ> let mystery = [6, 9, 4, 45, 70, 8, 39, 63, 306 ]
[Prelude Data.Char] λ> map (chr . (+64) . fromInteger) $ zipWith (div) mystery fibs
"FIBONACCI"