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 bash | |
# Dumps everything in your Kubernetes cluster into folders a YAML files. | |
# Use it at your own risk. | |
set -e | |
CONTEXT=“$1” | |
if [[ -z ${CONTEXT} ]]; 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
/// <summary> | |
/// This tool helps to identify and remove empty folders from your Unity 3D project. | |
/// | |
/// /// Why do I need this: | |
/// Empty folders are not committed by git but the connected meta files are. | |
/// So there will be a creation - deletion cycle between between person with and without such a folder. | |
/// | |
/// /// Usage: | |
/// The tool adds a new menu Tools->Empty Folder Tool. | |
/// 1. If you "Toggle Auto Delete", every time you remove or move something in your project |
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
1111 |
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
local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS | |
dev tun | |
proto udp #Some people prefer to use tcp. Don't change it if you don't know. | |
port 1194 | |
ca /etc/openvpn/easy-rsa/keys/ca.crt | |
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME | |
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME | |
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here! | |
server 10.8.0.0 255.255.255.0 | |
# server and remote endpoints |
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
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
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
Create a file: | |
$ pico /Users/Shared/logoutHook.sh | |
File content: | |
#!/bin/bash | |
say 'Hasta la vista baby!' | |
Set exuction permission: | |
$ sudo chmod +x /Users/Shared/logoutHook.sh |
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 UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
using System.Linq; | |
using System; | |
/// <summary> | |
/// Remove empty folders automatically. |
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.IO; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
public class RemoveEmptyFolders | |
{ | |
/// <summary> | |
/// Use this flag to simulate a run, before really deleting any folders. | |
/// </summary> |
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
# Adapted from https://developers.yubico.com/ykneo-openpgp/ResetApplet.html | |
gpg-connect-agent <<EOF | |
/hex | |
scd serialno | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 |
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
"""Task locking with redis in celery is hard, and good examples are tough to come by. This is the approach that's | |
worked for me, based on great work that other folks have posted: | |
* https://breadcrumbscollector.tech/what-is-celery-beat-and-how-to-use-it-part-2-patterns-and-caveats/ | |
* http://loose-bits.com/2010/10/distributed-task-locking-in-celery.html | |
* https://redis.io/topics/distlock | |
This isn't polished,but hopefully it's useful. To verify it in our local test env we register the following test task in | |
our definitions file: | |
*** definitions.py *** |