- OS: centos/7
- user: airflow
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
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |
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
-- Get Max ID from table | |
SELECT MAX(id) FROM table; | |
-- Get Next ID from table | |
SELECT nextval('table_id_seq'); | |
-- Set Next ID Value to MAX ID | |
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
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
service: my-api | |
org: CompanyName | |
# You can pin your service to only deploy with a specific Serverless version | |
# Check out our docs for more details | |
# frameworkVersion: "=X.X.X" | |
frameworkVersion: '>=2.1.1 <3.0.0' | |
custom: | |
defaultStage: dev |
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 | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="mongo18" | |
MONGO_HOST="172.19.0.2" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/opt/mongo-backup/backups/$APP_NAME" |
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 | |
set -x | |
NS="ns1" | |
VETH="veth1" | |
VPEER="vpeer1" | |
VETH_ADDR="10.200.1.1" | |
VPEER_ADDR="10.200.1.2" |
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
package singleton | |
import ( | |
"sync" | |
) | |
type singleton struct { | |
} | |
var instance *singleton |
libnfc supports UUID writable cards and even has some dedicated tools for them.
However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.
Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.
The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):
// Try to write the trailer
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/ruby | |
require 'rubygems' | |
require 'aws-sdk' | |
require 'optparse' | |
require 'json' | |
discovery = {'data' => []} | |
s3 = AWS::S3.new | |
s3.buckets.each do |bucket| |
NewerOlder