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
#!/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 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 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 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
/// <summary> | |
/// COM running object table utility class | |
/// </summary> | |
public static class ROTHelper | |
{ | |
public static IDictionary<string, object> GetActiveObjects(string MonikerFilter) | |
{ | |
var ret = new Dictionary<string, object>(); | |
IRunningObjectTable pprot; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace System.Linq | |
{ | |
public class KeyEqualityComparer<T> : IEqualityComparer<T> | |
{ | |
private readonly Func<T, T, bool> comparer; |
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
<?php | |
//GetPass for a website | |
//getpass(sitename.com) returns a XORed version of the sitename + salt | |
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | |
$homeDir = realpath(getenv("USERPROFILE")); | |
} else { | |
$homeDir = realpath("~"); | |
} | |
$salt = file_get_contents("$homeDir/.salt"); |
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 | |
#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 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 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 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