Skip to content

Instantly share code, notes, and snippets.

📉
ᕕ( ᐛ )ᕗ I am davloper

Quinlan Pfiffer qpfiffer

📉
ᕕ( ᐛ )ᕗ I am davloper
Block or report user

Report or block qpfiffer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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,
View just_lol.txt
40 ++-----+------+------+------+------+------+------+------+------+------+-------+------+------+------+------+-*----+------+------+------+-----++
+ + + + + + + + * + + +
| : : : : : : * : * : : |
| : *: : : : : * : * : : |
| * : *: : : : : * : * : : |
| * : *: : : : : * : * : : |
35 ++..........*..............*............................................................*...................*...................
View s.cr
require "json"
string = %({"coord":{"lon":-79.66,"lat":43.58},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"base":"stations","main":{"temp":292.49,"pressure":1017,"humidity":63,"temp_min":291.15,"temp_max":294.15},"visibility":24140,"wind":{"speed":3.6,"deg":150},"clouds":{"all":90},"dt":1507320000,"sys":{"type":1,"id":3722,"message":0.004,"country":"CA","sunrise":1507288997,"sunset":1507330127},"id":6075357,"name":"Mississauga","cod":200})
value = JSON.parse(string)
puts value["main"]["temp"]
View aliases.txt
no has the following 2 aliases:
* no became dm
PoopFace444 has the following 1 aliases:
mapstatetobusbus has the following 2 aliases:
* mapstatetobusbus became no
mapstatetopropsb has the following 2 aliases:
* mapstatetopropsb became mapstatetobusbus
busbus has the following 2 aliases:
* busbus became mapstatetopropsb
thanksandthankyo has the following 2 aliases:
View help.sh
quinlan@corinthian:~/.weechat/logs$ grep -B1 -rn 'tenyks.*LOLBOW$' ./irc.freenode.#infoforcefeed.weechatlog | grep -v 'LOLBOW' | grep -v '\-\-' | sed -r 's/([0-9 -:]*)(\s*)([a
-zA-Z1-9_-]*)(\s*)lol$/\3/g' | sort | uniq -c > /tmp/matches.txt
quinlan@corinthian:~/.weechat/logs$ cat /tmp/matches.txt
1 437815-2016-03-03 03:10:59 tenyks Link title: Urban Dictionary: Lol
1 446223-2016-04-05 19:07:17 Xe lol\
1 466876-2016-06-09 15:13:39 nijotz BimboTea
1 469408-2016-06-24 23:06:43 dm lol me bb
1 469885-2016-06-27 14:35:13 lykkin lol that's a good typo
1 525127-2017-02-28 16:05:48 [2017]
1 527824-2017-03-14 19:15:10 [2017]
You can’t perform that action at this time.