Skip to content

Instantly share code, notes, and snippets.

View dylanlott's full-sized avatar
🏗️
Hacking

d7t dylanlott

🏗️
Hacking
View GitHub Profile
@miguelmota
miguelmota / dns_lookup.go
Created January 15, 2019 15:36
Golang DNS lookup (ip, mx, txt, etc)
package main
import (
"fmt"
"net"
)
func main() {
ips, err := net.LookupIP("google.com")
if err != nil {
@superseb
superseb / README.md
Last active April 24, 2024 05:03
Generate self signed certificates for Rancher 2.x

Generate self signed certificates for Rancher 2.x

Generate certificates

docker run -v $PWD/certs:/certs \
  -e SSL_SUBJECT=test.example.com \
  -e SSL_DNS=test.example.com,test2.example.com \
  -e SSL_IP=10.0.0.1 \
 superseb/omgwtfssl
@AndiDittrich
AndiDittrich / AesUtil.js
Last active January 7, 2024 03:47
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// SPDX-License-Identifier: MPL-2.0
// AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// ----------------------------------------------------------------------------------------
// the encrypted datablock is base64 encoded for easy data exchange.
// if you have the option to store data binary save consider to remove the encoding to reduce storage size
// ----------------------------------------------------------------------------------------
// format of encrypted data - used by this example. not an official format
//
// +--------------------+-----------------------+----------------+----------------+
@tsileo
tsileo / duptools.sh
Created July 19, 2012 22:08
A bash script to simplify backup management with duplicity (encrypted incremental backups on amazon S3)
#!/bin/bash
export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
export PASSPHRASE=YOU_PASSHRASE
# directories, space separated
SOURCE="/home/thomas/backup /home/thomas/bin /home/thomas/documents"
BUCKET=s3+http://mybucket
LOGFILE=/home/thomas/tmp/duplicity.log
# set email to receive a backup report
@jonnyreeves
jonnyreeves / testrunner.html
Created June 2, 2012 13:32
Unit Testing Promises with Sinon.js
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
<!-- when.js Promises implementation -->
<script src="https://raw.github.com/cujojs/when/master/when.js"></script>
<!-- Unit testing and mocking framework -->
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>