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 os | |
import sys | |
from bs4 import BeautifulSoup | |
"""Bogotemplater template engine | |
Wraps a specified element in every HTML file in target directory with a template file | |
""" |
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
/* Board support headers */ | |
#include "stm32f4xx.h" | |
#include "stm32f4xx_gpio.h" | |
#include "stm32f4xx_tim.h" | |
#include "stm32f4xx_rcc.h" | |
#define TIMER_BASE_FREQUENCY 72000000 | |
#define PWM_FREQUENCY 40000 | |
#define PWM_TICKS TIMER_BASE_FREQUENCY/PWM_FREQUENCY |
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
Sub ConvertMailToTask(Item As Outlook.MailItem) | |
Dim objTask As Outlook.TaskItem | |
Set objTask = Application.CreateItem(olTaskItem) | |
Dim taskSplit As New RegExp | |
taskSplit.Pattern = "^task[:]?\s*" | |
taskSplit.Global = True | |
taskSplit.MultiLine = True | |
taskSplit.IgnoreCase = True | |
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 | |
# Requires goproctl from https://github.com/joshvillbrandt/goprohero | |
# Expects ssid and password as arguments | |
# Settings from https://github.com/KonradIT/goprowifihack/blob/master/HERO4/WifiCommands.md | |
function set_camera { | |
if [ -e /tmp/gperr ]; | |
then | |
rm /tmp/gperr | |
fi |
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 | |
if [ $# -lt 4 ]; | |
then | |
echo "Usage: camera-disk-rsync.sh DESTINATIONFOLDER MOUNT1 MOUNT2 SOURCEFILE\r\n" | |
echo "Where MOUNT1 and MOUNT2 are the mountpoints of the two drives" | |
exit | |
fi | |
foldername=$1 |
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 | |
# Place this somewhere sensible - your Cygwin home directory should suffice | |
export DISPLAY=:0.0 | |
#if [ -n "$DESKTOP_SESSION" ];then | |
eval $(gnome-keyring-daemon --start) | |
export SSH_AUTH_SOCK | |
export GNOME_KEYRING_CONTROL | |
#fi |
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 | |
if [ "$1" == "run" ]; | |
then | |
while true | |
do | |
all_proxy=socks5://socks-gw:1080 /usr/bin/syncthing -no-browser -logfile=/tmp/syncthing.log | |
sleep 1 | |
done | |
fi |
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 | |
set -e | |
if [ $1 = "-p" ] | |
then | |
host=$(echo "$3" | sed -e 's/git@//') | |
else | |
host=$(echo "$1" | sed -e 's/git@//') | |
fi |
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
# Taken partly from https://stackoverflow.com/a/36601467 | |
from datetime import datetime, timedelta | |
import os | |
from authlib.integrations.httpx_client import AsyncOAuth2Client | |
from sanic import Sanic | |
from sanic.log import logger | |
from sanic.response import raw | |
# This should be the full token endpoint URL, |