This file contains hidden or 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
=LET( | |
groupColumn,D2:D9, | |
valueColumn,K2:K9, | |
uniqueGroups,UNIQUE(groupColumn), | |
aggregatedValues,SUMIF(groupColumn,uniqueGroups,valueColumn), | |
HSTACK(uniqueGroups,aggregatedValues) | |
) |
This file contains hidden or 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
#Add to ~/.profile | |
function code() { | |
if ((( $# == 0 )) || [[ "$1" == "." ]]); then | |
echo "vscode://vscode-remote/ssh-remote+${USER}@gray:22${PWD}" | |
else | |
# convert relative path to absolute path | |
if [[ "$1" == /* ]]; then | |
echo "vscode://vscode-remote/ssh-remote+${USER}@gray:22$1" | |
else | |
echo "vscode://vscode-remote/ssh-remote+${USER}@gray:22${PWD}/$1" |
This file contains hidden or 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 bash | |
set -e | |
trap_with_arg() { # from https://stackoverflow.com/a/2183063/804678 | |
local func="$1"; shift | |
for sig in "$@"; do | |
trap "$func $sig" "$sig" | |
done | |
} |
This file contains hidden or 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 python | |
import sys | |
import os | |
import json | |
import pandas as pd | |
import ipaddress | |
private_ranges = [ | |
ipaddress.IPv4Network("10.0.0.0/8"), | |
ipaddress.IPv4Network("172.16.0.0/12"), |
This file contains hidden or 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 | |
# Post recv. hook to run deploy.sh from within repo in checkout dir | |
set -e -u -o nounset | |
echo "ARGS****************" | |
read oldrev newrev ref | |
echo "OLD=$oldrev" "NEW=$newrev" "REF=$ref" | |
echo "********************" |
This file contains hidden or 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 -eu -o pipefail | |
ip -j a | jq -r '.[] | .addr_info | map(select(.scope == "global")) | .[] | [ .family, .local ] | @csv' |
This file contains hidden or 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 | |
#Tested with pve-manager/3.4-16/40ccc11c Promox 3.4 | |
servername="your.server.here" | |
set -e -x | |
/usr/local/sbin/certbot-auto --no-self-upgrade renew >> /var/log/le-renew.log | |
cp /etc/letsencrypt/live/${servername}/fullchain.pem /etc/pve/local/pve-ssl.pem | |
cp /etc/letsencrypt/live/${servername}/privkey.pem /etc/pve/local/pve-ssl.key |
This file contains hidden or 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
curl https://pkgs.tailscale.com/stable/ubuntu/`lsb_release -cs`.gpg | sudo apt-key add - | |
curl https://pkgs.tailscale.com/stable/ubuntu/`lsb_release -cs`.list | sudo tee /etc/apt/sources.list.d/tailscale.list | |
sudo apt update | |
sudo apt install tailscale |
This file contains hidden or 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/zsh | |
##Does not work with glocud version 298-301 (should be fixed in 302) | |
##https://github.com/GoogleCloudPlatform/gsutil/issues/1052 | |
set -e -x -o pipefail | |
#Check tools | |
function check() { | |
which $1 >/dev/null || ( echo "$1 is needed; try brew install $1" ; exit 77 ; ); | |
if [ "$?" -eq 77 ]; then exit; fi |
This file contains hidden or 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
googletag.cmd.push(function() { | |
googletag.pubads().addEventListener('slotRenderEnded', function(e) { | |
let node = document.getElementById(e.slot.getSlotElementId()); | |
if (e.isEmpty) | |
{ | |
node.innerHTML = ` | |
<p>NO CREATIVE</p> | |
<ul><li>Fade background?</li> | |
<li>Put a fake creative / hardcoded?</li> | |
</ul> |
NewerOlder