Skip to content

Instantly share code, notes, and snippets.

@pantuts
pantuts / breachcompilation.txt
Created December 20, 2017 04:33
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:
@pantuts
pantuts / python-selenium-open-tab.md
Created December 21, 2017 16:17 — forked from lrhache/python-selenium-open-tab.md
Python Selenium - Open new tab / focus tab / close tab

On a recent project, I ran into an issue with Python Selenium webdriver. There's no easy way to open a new tab, grab whatever you need and return to original window opener.

Here's a couple people who ran into the same complication:

So, after many minutes (read about an hour) of searching, I decided to do find a quick solution to this problem.

reference: http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
yum update git
@pantuts
pantuts / gist:c74af59b199d9f0ea4f7867d66cbdc95
Created March 13, 2018 06:37 — forked from ebuckley/gist:1842461
python code to encode/decode morse code
morseAlphabet ={
"A" : ".-",
"B" : "-...",
"C" : "-.-.",
"D" : "-..",
"E" : ".",
"F" : "..-.",
"G" : "--.",
"H" : "....",
"I" : "..",
import re, requests
from bs4 import BeautifulSoup
u = 'https://free-proxy-list.net/'
soup = BeautifulSoup(requests.get(u).text, 'lxml')
trs = soup.find_all('tr')
for tr in trs:
_ip = tr.find('td', text=re.compile(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'))
if not _ip: continue
ip = _ip.get_text().strip()
@pantuts
pantuts / pldt-home-fibr-an5506-04-fa-rp2616-advanced-settings.md
Created September 9, 2018 11:48 — forked from kleo/backspace.md
PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings

PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings

By default the PLDT HOME FIBR AN5506-04-FA RP2616 comes only with limited settings.

Hidden from the web interface are the rest of the router's capabilities and advanced settings.

We just need to enter the right url for the settings you're looking for.

We need to be logged in before we can do anything else, use your defined password if you already set the admin password.

@pantuts
pantuts / luks_on_lvm_arch_linux_guide.txt
Created September 16, 2018 14:35 — forked from ddnomad/luks_on_lvm_arch_linux_guide.sh
Arch Linux installation with a full-disk encryption (LUKS on LVM)
########################################################################
# Author: ddnomad
# Version: 1.0.2
#
# External contributors:
# - u/momasf (https://www.reddit.com/user/momasf) - an excellent
# tip to use 'reflector' to speed up downloads during the base
# installation
#######################################################################
# DISCLAIMER/WARNING: Some people on r/archlinux were not quite happy
https://github.com/robbyrussell/oh-my-zsh/issues/5327
A Debugging Technique
I didn't read every post here, but I'm gonna post a technique for debugging slow startup just in case no one else has posted a good one yet.
If you install the moreutils package, you'll have a timestamp command called ts. You can use it to print sub second resolution timestamps of all of the debug output from zsh that tell you how long since the last line of output. Then you can search that file for timestamps that are "long". Here's the command:
zsh -xv 2>&1 | ts -i "%.s" > zsh_startup.log
Just hit 'ctrl-d' when the prompt pops up to exit the debug shell, and you can then read 'zsh_startup.log' with whatever you want. It'll be a long file, so find a good way to search it with regex. Keep in mind that zsh debug prints a line before running it, so the timestamps really tell you how long it took for the previous line to run, not the line the timestamp is currently on.
@pantuts
pantuts / install.sh
Created July 6, 2020 07:19 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@pantuts
pantuts / cloudSettings
Created July 21, 2020 12:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-21T12:24:59.949Z","extensionVersion":"v3.4.3"}