Skip to content

Instantly share code, notes, and snippets.

Avatar

Jesse Cotton JCotton1123

View GitHub Profile
@jbratu
jbratu / setupiisforsslperfectforwardsecrecy_v17.ps1
Last active Sep 1, 2021
Great powershell script for tightening HTTPS security on IIS and disabling insecure protocols and ciphers. Very useful on core installations.
View setupiisforsslperfectforwardsecrecy_v17.ps1
# Copyright 2019, Alexander Hass
# https://www.hass.de/content/setup-microsoft-windows-or-iis-ssl-perfect-forward-secrecy-and-tls-12
#
# After running this script the computer only supports:
# - TLS 1.2
#
# Version 3.0.1, see CHANGELOG.txt for changes.
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...'
Write-Host '--------------------------------------------------------------------------------'
@efrecon
efrecon / run.tpl
Last active Oct 3, 2021
`docker inspect` template to regenerate the `docker run` command that created a container
View run.tpl
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@phrawzty
phrawzty / 2serv.py
Last active Oct 15, 2021
simple python http server to dump request headers
View 2serv.py
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
View authorized_keys_command.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'net/http'
require 'uri'
require 'json'
require 'pry'
class User
attr_accessor :login
@rb2k
rb2k / gist:8372402
Last active Sep 13, 2021
A jenkins script to clean up workspaces on slaves
View gist:8372402
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
@neko-fire
neko-fire / PDF2Text
Created Oct 18, 2013
PDF to text converter class
View PDF2Text
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@vanstee
vanstee / authorized_keys_command.rb
Created Feb 23, 2013
Ruby script for AuthorizedKeysCommand that grabs public keys off github with the login
View authorized_keys_command.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'net/http'
require 'uri'
require 'json'
require 'pry'
class User
attr_accessor :login
@esperlu
esperlu / mysql2sqlite.sh
Created Apr 27, 2011
MySQL to Sqlite converter
View mysql2sqlite.sh
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite