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 discovery | |
import ( | |
"errors" | |
"net" | |
"log" | |
) | |
// | |
// USAGE: |
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 python3 | |
# coding=utf8 | |
# | |
# AUTHOR: Jardel Weyrich <jweyrich at gmail dot com> | |
# | |
from __future__ import print_function | |
import re, sys | |
def parse_alb_log_file(file_path): | |
fields = [ |
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
// | |
// AUTHOR: Jardel Weyrich <jweyrich dot gmail dot com> | |
// | |
#include <iostream> | |
#include <cstdlib> | |
template <class ValueT> | |
class NodeType { | |
public: |
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 | |
# | |
# DESCRIPTION: | |
# Make a gzipped backup from a MongoDB cluster >=3.2.0, | |
# preferrable from a slave, and upload it to the | |
# specified S3 bucket. | |
# | |
# REQUIREMENTS: | |
# sudo apt-get install -y awscli | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 |
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
import sys | |
if len(sys.argv) < 2: | |
print 'Missing parameter: BUCKET_NAME' | |
exit(1) | |
BUCKET_NAME = sys.argv[1] | |
ACCESS_KEY = 'CHANGE_ME' | |
SECRET_KEY = 'CHANGE_ME' |
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/python | |
import chardet | |
import os | |
# traverse root directory, and list directories as dirs and files as files | |
for root, dirs, files in os.walk("."): | |
path = root.split('/') | |
for file in files: | |
print '%s/%s => %s (%s)' % (root, file, chardet.detect(file)['encoding'], chardet.detect(file)['confidence']) |
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
-- | |
-- Script originally from https://azure.microsoft.com/en-gb/blog/finding-circular-foreign-key-references/ | |
-- | |
SET NOCOUNT ON | |
-- WWB: Create a Temp Table Of All Relationship To Improve Overall Performance | |
CREATE TABLE #TableRelationships ( | |
FK_Schema nvarchar(max), | |
FK_Table nvarchar(max), |
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 | |
# | |
# AUTHOR: Jardel Weyrich <jweyrich dot gmail dot com> | |
# | |
# HOW TO USE IT? | |
# | |
# 1) Replace the SNS_TOPIC_ARN value with your SNS topic's ARN; | |
# 2) Customize the messages to be sent in each case; | |
# 3) Add the following 2 lines after the #! line in your script: | |
# WORKDIR=$(dirname "$0") |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <libpe/pe.h> | |
int main(int argc, char *argv[]) { | |
if (argc < 2) { | |
fprintf(stderr, "Usage: poc <filename>\n"); | |
return EXIT_FAILURE; |
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
# | |
# Move the following 3 files to "~/Library/Application Support/Tunnelblick/Configurations/" | |
# | |
# 1. CA certificate (.crt) | |
# 2. Client certificate (.crt) | |
# 3. Client private key (.key) | |
# | |
############################################## | |
# Sample client-side OpenVPN 2.0 config file # | |
# for connecting to multi-client server. # |