Skip to content

Instantly share code, notes, and snippets.

@fvdnabee
fvdnabee / azurerm-windows_function_app-bug-functionapp-payload.json
Last active March 8, 2022 11:37
AzureRM request payload for azurerm_windows_function_app create request
{
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/yyy/resourceGroups/xxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id-d-zzz-0-cdbfxkv": {}
}
},
"kind": "functionapp",
"location": "westeurope",
"properties": {
@fvdnabee
fvdnabee / steps-arguments-artifacts-duplicate.yaml
Last active June 10, 2020 07:53
argo use the same argument artifacts in multiple steps
# Like parameters, artifacts can be "passed" to a template as well.
# In this example, the 'kubectl-input-artifact' template requires
# that an an artifact named 'kubectl' is supplied as an input,
# which it will place in /usr/local/bin/kubectl. This keeps the
# template more composable/flexible, than if the location was
# hard-wired inside the template.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: arguments-artifacts-
@fvdnabee
fvdnabee / setdisplays.sh
Created April 9, 2016 23:33
Shell script with xrandr for configuring displays at home or at work
#!/bin/sh
# This script will automatically configure my screen outputs depending on the
# outputs that are detected as connected by xrandr
# if both VGA1 and HDMI1 connected -> HDMI1 left of VGA1
# else if HMD1 connected and VGA1 not connected -> HDMI1 above internal display
# else -> just use internal display
if (xrandr | grep "HDMI1 connected") && (xrandr | grep "VGA1 connected"); then
# turn off internal screen:
xrandr --output LVDS1 --off
xrandr --output VGA1 --auto
@fvdnabee
fvdnabee / main.py
Created April 9, 2016 23:29
Google code jam input/output file handling in python
#!/usr/bin/python3
# Google code jam input/output file handling, implement process_input for the
# problem at hand
import argparse
def process_input(input):
output = 0
return output
diff --git a/dev/sht11/sht11.c b/dev/sht11/sht11.c
index f6780d0..5b81099 100644
--- a/dev/sht11/sht11.c
+++ b/dev/sht11/sht11.c
@@ -65,6 +65,7 @@
/* This can probably be reduced to 250ns according to data sheet. */
#ifndef delay_400ns
#define delay_400ns() _NOP()
+//#define delay_400ns() __delay_cycles(4); // 500 ns @ 8MHz
#endif
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
index bc32c89..832cb39 100644
--- a/plugins/tmux/tmux.plugin.zsh
+++ b/plugins/tmux/tmux.plugin.zsh
@@ -89,6 +89,7 @@ if which tmux &> /dev/null
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]
then
export ZSH_TMUX_AUTOSTARTED=true
+ export TERM=screen-256color
_zsh_tmux_plugin_run
@fvdnabee
fvdnabee / sixxs-aiccu-restart.sh
Last active August 29, 2015 14:07
pfsense: script to restart sixxs-aiccu daemon that hangs once in while...
#!/bin/sh
# Restart sixxs-aiccu...
/usr/bin/logger -t sixxs-aiccu-restart "Killing sixxs-aiccu daemon"
pidVar=`cat /var/run/aiccu.pid`
# sleep 10 seconds so the daemon is definitely killed
kill -9 $pidVar
sleep 10
# send signal again (for good measure)
@fvdnabee
fvdnabee / move-to-next-monitor.sh
Created February 3, 2014 11:18
Moving a window to the other vertical monitor in XFCE 4
#!/bin/sh
#
# Move the current window to the other vertical monitor. Adapted from the
# scripts for horizontal monitors at makandracards.com
#
# Only works on a 2x1 vertical monitor setup.
# Also works only on one X screen (which is the most common case).
#
# Props to
# http://icyrock.com/blog/2012/05/xubuntu-moving-windows-between-monitors/