File | Purpose |
---|---|
/etc/snikket/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/snikket.service |
Service unit to start and manage docker compose |
/etc/systemd/system/snikket-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/snikket-reload.timer |
Timer unit to plan the reloads |
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 | |
sed -i '/# BEGIN Wireguard vLAN #/,/# END Wireguard vLAN #/d' /etc/hosts | |
cat << EOF >> /etc/hosts | |
# BEGIN Wireguard vLAN # | |
10.7.0.1 letbox.wg | |
10.7.0.2 bellerophon.wg | |
10.7.0.3 specialk.wg | |
10.7.0.4 candy.wg | |
10.7.0.5 pixel7.wg | |
10.7.0.6 augustus.wg |
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
[SwitchyOmega Conditions] | |
; Require: SwitchyOmega >= 2.3.2 | |
; Date: 8/28/2022 | |
; Usage: https://github.com/FelisCatus/SwitchyOmega/wiki/RuleListUsage | |
*.tandfonline.com | |
*.aeaweb.org | |
*.journals.uchicago.edu | |
*.springer.com | |
*.jstor.org |
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 | |
echo Adding microphone to Pulseaudio | |
grep -qxF 'load-module module-alsa-source device=hw:0,99' /etc/pulse/default.pa || echo 'load-module module-alsa-source device=hw:0,99' >> /etc/pulse/default.pa | |
echo Adding headphone to Pulseaudio | |
grep -qxF 'load-module module-alsa-sink device=hw:0,1' /etc/pulse/default.pa || echo 'load-module module-alsa-sink device=hw:0,1' >> /etc/pulse/default.pa | |
echo Adding headset microphone to Pulseaudio |
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
# This script installs an repository for apt, dnf, yum, or zypper. It expects | |
# the following eniroment variables. | |
# GPG_KEY : the gpg key itself | |
# APP_NAME : the name to use for the repo file and key | |
# DEB_REPO : (optional) the string to appear in the .list file | |
# RPM_REPO : (optional) the string to appear in the .repo file | |
# Override repostiroy based on distribution identity | |
test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release' | |
if [ -f "${os_release}" ]; then |
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
$R_lib_path = "$env:USERPROFILE\R" | |
[System.Environment]::SetEnvironmentVariable('R_LIBS_USER', $R_lib_path, [System.EnvironmentVariableTarget]::User) | |
New-Item -ItemType Directory -Force -Path $R_lib_path |
This is an include to use utterances comments on any Jekyll static site. It is fully compatible with GitHub Pages.
Add utterances.html
to your /_includes
folder. Put the following include statement in the part of your layout/page/post/include that you want the comments to be in:
{% include utterances.html %}
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
from cgi import FieldStorage | |
from io import BytesIO | |
def parse_into_field_storage(fp, ctype, clength): | |
fs = FieldStorage( | |
fp=fp, | |
environ={'REQUEST_METHOD': 'POST'}, | |
headers={ | |
'content-type': ctype, |
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
SetTitleMatchMode, 2 | |
GradeAssignment(s) | |
{ | |
WinActivate SpeedGrader ; Use window with "SpeedGrader" in name | |
CoordMode, Click, Window | |
WinGetPos, winX, winY, winWidth, winHeight, A | |
Y := winHeight * 0.26 ; Get textbox Y coordinate | |
tX := winWidth * 0.57 ; Get textbox X coordinate | |
rX := winWidth * 0.95 ; Arbitrary coordinate on right panel |
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
## Define Akritas et al T-S estimator | |
def censoredts(data): | |
""" | |
This function takes a three-column cupy array where the first column is the | |
independent variable, the second is the dependent variable, and the third is | |
an indicator which tells us if the data has been censored. | |
""" | |
# Make an index for pairwise treatment of data | |
from itertools import combinations | |
indit = zip(*combinations(range(n),2)) |
NewerOlder