Skip to content

Instantly share code, notes, and snippets.

View rubenerd's full-sized avatar

Ruben Schade rubenerd

View GitHub Profile
#!/usr/bin/env python
#################
## CREDENTIALS ##
#################
GH_PERSONAL_ACCESS_TOKEN = ''
BB_USERNAME = ''
BB_APP_PASSWORD = ''
BB_OAUTH_KEY = ''
@alyssais
alyssais / vpn
Created May 8, 2018 17:12
A tiny command line interface to Viscosity
#!/usr/bin/env bash
run_list() {
osascript <<OSA
tell application "Viscosity"
repeat with theConnection in connections
set theName to name of theConnection
set theState to state of theConnection
log theName & ": " & theState
end repeat
Title: FreeBSD on the GPD Pocket
Tags: hardware freebsd drivers kernel gpdpocket
Date: 2017-08-22
Preview: FreeBSD on the GPD Pocket
Permalink: 0288
In the distant past before smart phones became identical black rectangles there
was a category of devices called [palmtops][0]. Palmtops were a class of PDA PC
thing that fit in the palm of your hand. Today the Psion 5 series of devices
most often capture peoples attention. Not only are they small and awesome, but
@hans2103
hans2103 / server.badbots
Last active April 7, 2024 14:28
NGINX to block bad bots. (add Twenga|TwengaBot if you want to exclude them too)
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|discobot|DISCo|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearchSpider|ExpertSearch|Express\ WebPictures|ExtractorPro|extract|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|Genieo|genieo|GetRight|GetWeb\!|GigablastOpenSource|GozaikBot|Go\!Zilla|Go\-Ahead\-Got\-It|GrabNet|grab|Grafula|GrapeshotCrawler|GTB5|GT\:\:WWW|Guzz
@theory14
theory14 / main.yaml
Created September 12, 2015 10:35
Ansible role for updating FreeBSD machines with freebsd-update and pkg
---
- name: Check status of jailing
shell: "sysctl security.jail.jailed | cut -d: -f2 | tr -d ' '"
register: is_jail
when: "ansible_os_family == 'FreeBSD' "
- name: Fetch and Install Updates
command: "{{ item }}"
when: "ansible_os_family == 'FreeBSD' and is_jail.stdout == '0'"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.30978870391845703</real>
<key>Green Component</key>
<real>0.30978870391845703</real>
@domdavis
domdavis / opml2md
Last active August 5, 2023 03:08
OPML to Markdown converter, based on https://gist.github.com/alecperkins/5671192 and fixed up to produce a nested list in Markdown.
"""
Based on https://gist.github.com/alecperkins/5671192
$ pip install opml
$ python opml2md.py some_outline.opml
-> some_outline.md
"""
import codecs
import opml
import sys
@rxin
rxin / ramdisk.sh
Last active December 13, 2023 02:40
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@jihan917
jihan917 / startnet.bat
Created January 9, 2013 22:35
Microsoft Network Client for DOS - script to start net
@echo off
rem config.sys should have "device=ifshlp.sys"
rem (and that alone suffices. --without protman.dos/pcntnd.dos/dis_pkt.dos)
PATH=C:\MSNET;%PATH%
net initialize
netbind
umb
@spikegrobstein
spikegrobstein / nginx.conf
Last active September 22, 2023 04:19
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.