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
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
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
#!/usr/bin/python | |
# Downloads the current "Astronomy Picture of the Day" from nasa.gov and sets as wallpaper | |
# | |
# Installation steps: | |
# - store this file somewhere and take note of the path | |
# - change WALLPAPER_DIR to some folder in your home directory | |
# and create the folder | |
# - make it executable: | |
# chmod a+x /path/to/change_wallpaper | |
# - follow instructions given in the .plist file to make it run daily |
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
#!/usr/bin/perl | |
# jpeg2kml.pl | |
# Extracts GPS location data from JPEG EXIF and creates a KMZ file with thumbnails | |
# http://home.max-weller.de/perl/jpeg2kml/ | |
use strict; | |
use Image::ExifTool qw(:Public); | |
use File::Basename; | |
use File::Copy; | |
use Data::Dumper; |
NewerOlder