Skip to content

Instantly share code, notes, and snippets.

ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-ECDSA-AES256-GCM-SHA256
ECDHE-RSA-AES256-GCM-SHA256
ECDHE-ECDSA-AES256-SHA256
ECDHE-RSA-AES256-SHA256
DHE-RSA-AES256-GCM-SHA384
DHE-RSA-AES256-GCM-SHA256
DHE-RSA-AES256-SHA256
AES256-GCM-SHA384
@max-mapper
max-mapper / index.js
Last active September 11, 2015 19:53
generate rsa keypair and format public key in openssh format in javascript
// warning you probably want `ssh-keygen -t ed25519` for most use cases. this method lacks secure prng and uses weak rsa
var keypair = require('keypair')
var forge = require('node-forge')
// generates new keypair (slow)
var pair = keypair()
// creates intermediate forge key object
var publicKey = forge.pki.publicKeyFromPem(pair.public)
@silverwind
silverwind / setClass.css
Last active December 17, 2015 18:29
Set a class once the DOM has fully loaded it
@keyframes nodeInserted {
from { clip: rect(1px, auto, auto, auto); }
to { clip: rect(0px, auto, auto, auto); }
}
@silverwind
silverwind / ococat.css
Last active December 31, 2015 13:29
Octocat Spinner in SVG & CSS - http://codepen.io/silverwind/details/ocxpD
body { background: #222 }
#octo #cat { fill: #fff }
#octo { position: fixed; height: 100%; width: 100% }
#octo .part {
animation-name: fade;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
fill: #333;
var btn = document.getElementById("copy-button");
btn.addEventListener("click", clickHandler, false);
function clickHandler(e) {
document.exeCommand('copy');
}
@LouCypher
LouCypher / gist:3218906
Last active May 26, 2016 00:20
Use external editor to edit style on Stylish extension
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
@mafintosh
mafintosh / npm-classic-config.sh
Last active June 21, 2018 17:40
Resets the npm defaults to how they used to be
npm config set loglevel http
npm config set progress false
npm config set package-lock false
npm config set save false
mkdir -p ~/.config/configstore/
printf '{"optOut": true,"lastUpdateCheck": 0}' > ~/.config/configstore/update-notifier-npm.json
# Simulate fake processes of analysis sandbox/VM that some malware will try to evade
# This just spawn ping.exe with different names (wireshark.exe, vboxtray.exe, ...)
# It's just a PoC and it's ugly as f*ck but hey, if it works...
# Usage: .\fake_sandbox.ps1 -action {start,stop}
param([Parameter(Mandatory=$true)][string]$action)
$fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe",
"VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe",
@vaughnd
vaughnd / gist:3759951
Created September 21, 2012 06:02
Bash script to run more than one process in parallel and kill all when exiting the script (via ctrl-c or kill)
#!/bin/bash
# kill all subshells and processes on exit
trap "kill 0" SIGINT
# start commands in subshells so all their spawn DIE when we exit
( process1 ) &
( process2 ) &
wait
@wilbowma
wilbowma / jail.pl
Last active August 1, 2022 11:16
A perl script to create nginx chroot in arch linux.
#a/usr/bin/perl
# This script was hastily cobbled together for my own use. It can
# probably break your system. Use at your own risk.
$JAIL = "/srv/http";
$USER = "http";
$GROUP = "http";
$WWW_DIR = "www";
sub run{