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/sh | |
if [ -z "$HOSTNAME" ]; then | |
echo 'input $HOSTNAME' | |
read HOSTNAME | |
fi | |
if [ -z "$ROOT_PASSWORD" ]; then | |
echo 'input $ROOT_PASSWORD' | |
read ROOT_PASSWORD |
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
openssl s_client -cipher EXPORT -connect domain.com:443 < /dev/null 2>/dev/null | grep SSL-Session | wc -l |
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
while true; do echo -n -e "HTTP/1.1: 200 OK\n\nHello world\n" | nc -l 8080; done |
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 Mojolicious::Plugin::Pipeline::CSSCompressor; | |
use Mojo::Base 'Mojolicious::Plugin'; | |
use CSS::Compressor 'css_compress'; | |
sub register { | |
my ($self, $app) = @_; | |
# Register "css_compressor" filter | |
$app->filter(css_compressor => sub { css_compress shift }); |
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
<VirtualHost *:80> | |
#this handles sitename.example.com | |
ServerName example.com | |
ServerAlias *.example.com | |
Options -Indexes FollowSymLinks | |
UseCanonicalName Off | |
VirtualDocumentRoot /opt/example/sites/%1/app/webroot |
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
verify_keypair() { diff <(openssl rsa -in $1 -modulus -noout) <(openssl x509 -in $2 -modulus -noout) >/dev/null 2>&1 ; return $?; }; |
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
debug_keypair() { (openssl s_server -cert $2 -key $1 -CAfile $3 -www -no_ssl2 -accept 4433) & sleep 1; if ! lsof -i:4433; then return 1; fi; jobid=$(jobs %?"openssl s_server" | sed -e 's/^\[\(.\+\)\].*/\1/'); openssl s_client -connect localhost:4433 -showcerts -ssl3 -CAfile $3 </dev/null; kill %$jobid; return 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
import collections | |
import ctypes | |
import ctypes.util | |
# bit masks | |
IN_ISDIR = 0x40000000 | |
IN_ALL_EVENTS = 0xfff | |
class inotify_event_struct(ctypes.Structure): | |
""" |
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 python | |
from ctypes import CDLL, CFUNCTYPE, c_char_p, c_int, c_uint32 | |
from ctypes.util import find_library | |
import argparse | |
import os | |
import struct | |
import sys | |
import select |
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
cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w48 | head |
OlderNewer