This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run repeatedly until you have collected enough notifications | |
curl -H "authorization: Bearer $MASTODON_TOKEN" "https://$MASTODON_HOST/api/v1/notifications?limit=30&max_id=$(sqlite3 mastodon.db 'select min(nid) from noti;' || echo 0)" \ | |
| jq '.[] | {nid:.id,type,created_at,user:.account.username,sid:.status.id,content:.status.content}' \ | |
| dumptodb --db mastodon.db --table noti --key nid | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import random | |
import sys | |
class GameMasterStrategy: | |
def step1(self): | |
self.doors = [1,2,3] | |
self._correctDoor = random.choice(self.doors) | |
return self.doors | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QLabel | |
from PyQt5.QtCore import Qt | |
from PyQtAds import ads | |
def makewindow(name): | |
txt = QTextEdit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dino < Formula | |
desc "Modern Jabber/XMPP Client using GTK+/Vala " | |
homepage "https://dino.im" | |
## TODO: This is not really a version, but a dummy that's not going to work. | |
# url "https://github.com/dino/dino/archive/0.0.tar.gz" | |
# sha256 "a951b50559671ab30e74304ddc66c943405c8ad1bcbe4d77bef647a081fd0dbb" | |
head do | |
url "https://github.com/dino/dino.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(wp post list --post_type=product_variation --meta_key=_downloadable_files --fields=ID | tail -n +2; | |
wp post list --post_type=product --meta_key=_downloadable_files --fields=ID | tail -n +2) | ( | |
while read ID; do wp post meta get $ID _downloadable_files ; done) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// library: Infrared | |
// Sends Rc5 0/1 twice with different toggle values. | |
// Turns e.g. a Philips TV to channel 11. | |
#include <Rc5Renderer.h> | |
#include <IrSenderNonMod.h> | |
static IrSenderNonMod sender(3); | |
IrSignal *signal ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THE LOW-DOWN ON LOADALL: | |
EXCERPTS FROM THE BOOK | |
THE HYPER-SPACE NAVIGATOR'S GUIDE | |
by | |
Terrance E. Hodgins | |
copyright (C) 1990 by Terrance E. Hodgins, | |
All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Control Dell P4317Q monitor over RS232 | |
# usage examples: | |
# read monitor name string and brightness: ./dell_P4317Q_ctrl.py eb01 eb30 | |
# set brightness to minimum: ./dell_P4317Q_ctrl.py ea3000 | |
# set brightness to maximum: ./dell_P4317Q_ctrl.py ea30ff | |
# night mode: ./dell_P4317Q_ctrl.py eb01 ea3000 ea3133 ea4800010000 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HexTweets | |
// @version 1 | |
// @grant none | |
// @match https://twitter.com/* | |
// ==/UserScript== | |
var re = /^#[a-fA-F0-9]{6}$/; | |
var hashtags = document.querySelectorAll("div.tweet a.twitter-hashtag"); | |
for(var i in hashtags) { |
NewerOlder