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 | |
{ | |
# | |
# Get rid of pulse and its cache (so this script can be run multiple times) | |
# | |
rm ~/.config/pulse/* | |
pulseaudio -k | |
# | |
# Wait till pulse sorts itself out |
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
# | |
# A TERRAFORM local_exec provisioner to remove all the content from a bucket because | |
# Terraform is so bloody slow doing it | |
# | |
# Arrange for this script to be executed before the bucket is deleted. | |
# | |
# ALSO you must arrange for AWS CLI credentials to available to this script | |
# | |
# ONE way to do that is to run the terraform command in the context of AWS CLI | |
# credentials too, setting the standard AWS CLI environment variables, plus the |
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
# | |
# Only use for simple executions of GVIM | |
# | |
if [[ "$1" == -f ]]; then | |
file=$2 | |
else | |
file=$1 | |
fi | |
if [[ -e "$file" ]]; 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>JSON Schema Editor Extreme Example</title> | |
<script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>JSON-Editor Categories example with normal Basic tab</title> | |
<link rel='stylesheet' type='text/css' media='screen' | |
href='https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/css/jsoneditor.min.css'> | |
<link rel='stylesheet' type='text/css' media='screen' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>JSON-Editor Categories example with Basic tab grid workaround</title> | |
<link rel='stylesheet' type='text/css' media='screen' | |
href='https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/css/jsoneditor.min.css'> | |
<link rel='stylesheet' type='text/css' media='screen' |
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
/* | |
* Put this in a place where node can find it (referenced by $SCRIPT_HOME in the driver script) | |
* or figure out how to do this with JQ :) | |
* | |
* Basically, for every key that starts with "registry.terraform.io/hashicorp/" duplicate its value to | |
* that same key with "hashicorp" translated to "-" (keep the original property too) | |
*/ | |
const fs = require("fs") | |
const output ={}; | |
Object.entries(JSON.parse(fs.readFileSync( "/dev/stdin" ))).forEach(([key,value]) => { |
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
-- | |
-- Prerequisites: you are using PipeWire, WirePlumber is your session manager, and you | |
-- are using a per-user configuration. These preconditions are fulfilled in Pop!OS 22_04. | |
-- | |
-- It does not matter what API the PipeWire client is using to interact with PipeWire - Pulse, | |
-- Jack, ALSA, Native - this works in all cases. | |
-- | |
-- Put this file in $HOME/.config/wireplumber/main.lua.d, then restart the services related | |
-- to PipeWire - "systemctl --user restart wireplumber pipewire pipewire-pulse" | |
-- |
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
function doGet() { | |
try { | |
const savedConfig = PropertiesService.getUserProperties(); | |
const triggerId = savedConfig.getProperty('TriggerId'); | |
if (triggerId) { | |
Logger.log("Looking for triger", triggerId) | |
let t = ScriptApp.getProjectTriggers(); | |
for (let trigger of t) { | |
if (trigger.getUniqueId() == triggerId) { | |
Logger.log("Removing trigger", triggerId, trigger); |
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
// | |
// A JSON-serializeable representation of the V1 API Gateway event. | |
// | |
// While it is SUPER convenient to use the http::Request to handle the event in | |
// most of the Lambda code, when calling a Lambda function we need a JSON view of the | |
// event - i.e. we need to be able to recreate the JSON structure from the Request. | |
// aws_lambda_events::event::apigw::ApiGatewayProxyRequest already provides the structure | |
// and Serialize implementation to do this, BUT it requires an AWFUL lot of cloning to | |
// get the values in place. THIS approach uses references to the various parts from the | |
// Request and its extensions, so avoiding cloning where possible. |
OlderNewer