- end-of-stream - specify a callback to be called when a stream ends (which is surpsingly hard to get right)
- duplexify - compose a Duplex stream from a Readable and a Writable stream
- pump - pipe streams together and close all of them if one of them closes
- pumpify - combine an array of streams into a single duplex stream using pump and duplexify
- through2 - tools for making Transform streams
- from2 - tools for making Readable streams
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
public static String getAllQuery(String query) { | |
String result = ''; | |
String regex = '^select\\s+\\*\\s*(?:,\\s*[^\\s]+\\s*)*\\s+from\\s+([^\\s]+)(.*)$'; | |
Matcher m = Pattern.compile(regex).matcher(query.toLowerCase()); | |
if(m.matches()) { | |
String sObjectName = m.group(1); | |
Schema.SObjectType targetType = Schema.getGlobalDescribe().get(sObjectName); | |
Map<String, Schema.SObjectField> fieldMap = targetType.getDescribe().fields.getMap(); |
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
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
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
admin account info" filetype:log | |
!Host=*.* intext:enc_UserPassword=* ext:pcf | |
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd | |
"AutoCreate=TRUE password=*" | |
"http://*:*@www” domainname | |
"index of/" "ws_ftp.ini" "parent directory" | |
"liveice configuration file" ext:cfg -site:sourceforge.net | |
"parent directory" +proftpdpasswd | |
Duclassified" -site:duware.com "DUware All Rights reserved" | |
duclassmate" -site:duware.com |
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
# OSX for Pentesting (Mavericks/Yosemite) | |
# | |
# A fork of OSX for Hackers (Original Source: https://gist.github.com/brandonb927/3195465) | |
#!/bin/sh | |
# Ask for the administrator password upfront | |
echo "Have you read through the script prior to running this? (y or n)" | |
read bcareful |
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
cmdkey /list | ForEach-Object{if($_ -like "*target=TERMSRV/*"){cmdkey /del:($_ -replace " ","" -replace "Target:","")}} | |
echo "Connecting to 192.168.1.100" | |
$Server="192.168.1.100" | |
$User="Administrator" | |
$Password="AdminPassword" | |
cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password | |
mstsc /v:$Server |
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 | |
# Rulz.py | |
# Author: Nick Landers (@monoxgas) - Silent Break Security | |
import os | |
import sys | |
import argparse | |
import re | |
import binascii | |
import codecs |
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
apt-get install libxml2-utils sshpass devscripts python-yaml python-paramiko python-jinja2 cdbs debhelper dpkg-dev git-core reprepro asciidoc | |
git clone git://github.com/ansible/ansible.git --recursive | |
cd ./ansible | |
git checkout [branch-with-desired-version] # stable-1.9 etc. | |
git pull --rebase | |
git submodule update --init --recursive | |
make && make deb | |
dpkg -i deb-build/[some-path]/ansible[some-build-details].deb |
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
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |
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
html { | |
font-size: 14px; | |
} | |
/** | |
* PostCSS | |
* Use a custom PostCSS to convert #sp to rems by dividing the number by 14 and expressing it as #rem | |
*/ | |
body { |