Skip to content

Instantly share code, notes, and snippets.

📉
ᕕ( ᐛ )ᕗ I am davloper

Quinlan Pfiffer qpfiffer

📉
ᕕ( ᐛ )ᕗ I am davloper
View GitHub Profile
View here you go.txt
quinlan@corinthian:~/.weechat/logs$ grep -P '\t[mM][a-zA-Z]* [cC][a-zA-Z]*$' irc.freenode.#infoforcefeed.weechatlog irc.freenode.#shitstream.tv.weechatlog | sed 's/.*log://g' > /tmp/matches
quinlan@corinthian:~/.weechat/logs$ cat /tmp/matches | sed -E 's/[[:space:]].*//' | uniq -c | sed -E -e 's/^[[:space:]]*//' | gnuplot -e 'set terminal dumb 150 50; set grid; set datafile separator " "; set xdata time; set timefmt "%Y-%m-%d"; plot "< cat" using 2:1 with lines title ""'
45 +-+-+----+---+----+---+---+----+---+----+---+---+----+-*-+----+---+----+---+---+----+---+---+----+---+----+---+---+----+---+----+---+----+-+-+
+ + + + * +
@qpfiffer
qpfiffer / output_clean.json
Last active Mar 4, 2020
Now with screams!
View output_clean.json
{
"times_celebrated": 1176,
"dates_celebrated": {
"2015-10-2": [
"cblgh",
"Wally"
],
"2015-10-4": [
"dx",
"cblgh",
View stats.txt
$ grep -P '\t[mM][a-zA-Z]* [cC][a-zA-Z]*$' irc.freenode.#infoforcefeed.weechatlog irc.freenode.#shitstream.tv.weechatlog
$ cat /tmp/mc_matches | sed -r 's/^.*:\t//g' | sort -h | uniq -c | sort -h > /tmp/stats.txt
1 maaaaaaaaaaaaaaaaaaaaaaaaa chain
1 macadamia chutney
1 macadamia cup
1 macaroni cupholder
1 ma chain
1 machiavellian croissant
1 Machiavellian cruelty
1 machinating craftily
View nijotz queries
$ grep -rn '.*[eEth].*[ \$]297.*' irc.freenode.#infoforcefeed.weechatlog irc.freenode.#shitstream.tv.weechatlog
irc.freenode.#infoforcefeed.weechatlog:34910:2013-12-04 22:19:40 er1c_ i've been mining too: 1001 11225 7.2 18.9 2975704 583588 pts/7 Ssl+ Aug21 10982:57 minecraft_server.jar nogui
irc.freenode.#infoforcefeed.weechatlog:35169:2013-12-05 13:42:00 nijotz It performs a commit for every file it unannexes, so 2975 commits
irc.freenode.#infoforcefeed.weechatlog:567927:2017-10-10 15:52:12 tenyks Ethereum (ethusd=x) 297.9900 None (+0.1109%) None
irc.freenode.#infoforcefeed.weechatlog:570243:2017-10-25 17:12:50 tenyks Ethereum (ethusd=x) 297.5200 None (-0.0336%) None
irc.freenode.#infoforcefeed.weechatlog:580891:2017-12-13 14:27:21 jnerula eth at 297
irc.freenode.#infoforcefeed.weechatlog:595183:2018-03-06 17:09:23 jnerula Eth at 297
irc.freenode.#infoforcefeed.weechatlog:596796:2018-03-21 23:02:30 jnerula eth @ 297
irc.freenode.#shitstream.tv.weechatlo
View comparisons.js
const userProfileIsOldEnough = () => {
return userProfile.age > 18;
}
export default { userProfileIsOldEnough };
View example.py
data = [
{
wifi: ...
},
{
...
},
{
...
}
View thing.py
#!/usr/bin/env python3
from functools import reduce
TUPLES = (
(0,24),
(1,20),
(2,9),
(3,5),
(4,3),
(5,3),
View loggin.js
correctlyLogErrors: (wrappedFunction) => {
var new_func = async (...functionArguments) => {
var retval = null
try {
retval = await wrappedFunction(...functionArguments)
} catch (error) {
console.log("ERROR THROWN:", error.message)
console.log("STACK:", error.stack)
throw(error)
}
View wat.js
// Runs and works as expected:
let err = null
var userQueryResult
[userQueryResult, err] = await to(function())
// throws an error:
let err = null
var userQueryResult = null
[userQueryResult, err] = await to(function())
View thing.json
{
"_readableState":{
"objectMode":false,
"highWaterMark":16384,
"buffer":{
"head":null,
"tail":null,
"length":0
},
"length":0,
You can’t perform that action at this time.