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
#!/bin/sh | |
# | |
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de> | |
# License: Mozilla Public License 2.0 | |
# SPDX-License-Identifier: MPL-2.0 | |
# | |
# OpenWRT firewall script for configuring NPTv6 (network prefix translation). | |
# | |
# # Installation | |
# |
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
#!/bin/bash | |
# | |
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de> | |
# License: Mozilla Public License 2.0 | |
# | |
# Run a zrepl job and block/wait until it's finished (with progress indication). | |
# | |
# Note: this is basically a hack until there's a properly integrated solution for this. | |
# see https://github.com/zrepl/zrepl/issues/427 |
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 | |
# | |
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de> | |
# License: Mozilla Public License 2.0 | |
# | |
# Synchronize directories between computers using rsync (and SSH). | |
# | |
# INSTALLATION: | |
# Save this script as something like `sync-to` somewhere in $PATH. | |
# Link it to `sync-from` in the same location. (i.e. `ln sync-to sync-from`) |
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
#!/bin/bash | |
# | |
# Riyad Preukschas <riyad@informatik.uni-bremen.de> | |
# License: Mozilla Public License 2.0 | |
# SPDX-License-Identifier: MPL-2.0 | |
# | |
# List all processes and how much swap they use. | |
# The output format is: "<swap used> : <pid> : <process name>" | |
# | |
# To get the top 10 processes using swap you can run: |
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
# | |
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de> | |
# License: Mozilla Public License 2.0 | |
# | |
# Loads an unsafe (i.e. with several security features disabled) instance of | |
# Chrome with a temporary profile (i.e. all data is lost once Chrome is closed) | |
chrome-unsafe() { | |
# for Homebrew Cask (see http://caskroom.io/) compatibility | |
local -a CHROME_PATHS |
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
APP_ABI := armeabi-v7a arm64-v8a | |
APP_OPTIM := release | |
APP_BUILD_SCRIPT := $(NDK_PROJECT_PATH)/Android.mk | |
APP_PLATFORM := android-29 |
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/python3 | |
# | |
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de> | |
# License: Mozilla Public License 2.0 | |
# | |
# Scaffolding for fetching and parsing emails from IMAP | |
import imaplib | |
import email.parser | |
import email.policy |
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
module ApplicationHelper | |
# thanks to http://blog.phusion.nl/2011/08/14/rendering-rails-3-1-assets-to-string/ | |
# you may need to change the owner of the tmp/cache/* directories to the web servers user | |
# e.g. for Debian systems: `chown -R www-data:www-data tmp/cache/*` | |
def render_asset(asset) | |
Conferator::Application.assets.find_asset(asset).body.html_safe | |
end | |
end |
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 ruby | |
# | |
# Cleanup Sidekiq uniquejobs in Redis | |
# see https://github.com/mhenrixon/sidekiq-unique-jobs/issues/195 | |
# | |
require 'bundler/setup' | |
require 'sidekiq/api' | |
DRY_RUN = true |
NewerOlder