Skip to content

Instantly share code, notes, and snippets.

@bagder
bagder / trrprefs.md
Last active December 27, 2022 05:17
This once held TRR prefs. Now it has moved.

NOTE

This content has moved.

Please go to bagder/TRRprefs for the current incarnation of the docs, and please help us out polish and maintain this documentation!

@RickCogley
RickCogley / curl-to-matrix-text-readme.md
Last active February 25, 2024 01:45
Testing curl to matrix.org

Testing the matrix.org client-server API

Matrix is:

an open standard for decentralised communication, providing simple HTTP APIs and open source reference implementations for securely distributing and persisting JSON over an open federation of servers.

It's pretty fantastic, if you think on the massive problem of fragmentation all across the web. They've created an easy to use API, and you can do a kludgy test using curl from the terminal (*nix, mac, win). See: http://matrix.org/docs/howtos/client-server.html

It's pretty straightforward to do a quick test. I have an account at https://matrix.org / https://vector.im, so I used that to get a token.

@steevp
steevp / gog-notify.py
Last active December 28, 2019 17:20
Checks for new GOG Connect games
#!/usr/bin/env python2
# Script to check for new GOG Connect games
#
# Configure your system for sending emails first. I used:
# https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay/
import requests
import browsercookie
import json
import smtplib
from email.mime.text import MIMEText
@mtigas
mtigas / 0 ProPublica Tor hidden service config.md
Last active April 10, 2023 16:31
Configuration for ProPublica’s Tor hidden service proxy.

Note (December 16, 2021): These example files haven't been updated since 2016. In either 2019 or 2020, our onion domain was changed to a longer v3 onion address (p53lf57qovyuvwsc6xnrppyply3vtqm7l6pcobkmyqsiofyeznfu5uqd.onion). The examples below don't reflect this, but the configuration portions remain accurate regarding how we currently serve the onion site. (Tor Browser dropped support for v2 addresses, such as propub3r6espa33w.onion, in the second half of 2021.)


These files contain the base configuration for ProPublica’s Tor hidden service mirror.

Of note:

  • We're using the nginx "subs_filter" and "headers more" modules to allow us to rewrite content and update headers, so that we can convert clearnet links into onion links, where possible.
@jrwren
jrwren / gist:9abe22b4761dc854a66e
Last active September 29, 2019 21:30
curl to kodi examples
# drawingroom is a DNS entry to the IP of my KODI
curl -D - -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}' drawingroom/jsonrpc
curl -D - -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "artist", "season", "episode", "duration", "showtitle", "tvshowid", "thumbnail", "file", "fanart", "streamdetails"], "playerid": 1}, "id": "VideoGetItem"}' drawingroom/jsonrpc
# play a url - these don't actually work.
curl --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open", "params": {"item": { "file": "http://usher.justin.tv/api/channel/hls/nathanias.m3u8?allow_source=true&token=%7B%22user_id%22%3A20783272%2C%22channel%22%3A%22nathanias%22%2C%22expires%22%3A1452203636%2C%22chansub%22%3A%7B%22view_until%22%3A1924905600%2C%22restricted_bitrates%22%3A%5B%5D%7D%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j