This file contains hidden or 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
set -a; source ~/example.env; set +a |
This file contains hidden or 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
$ git rm --cached giant_file | |
# Stage our giant file for removal, but leave it on disk | |
Commit this change using --amend -CHEAD: | |
$ git commit --amend -CHEAD | |
# Amend the previous commit with your change | |
# Simply making a new commit won't work, as you need | |
# to remove the file from the unpushed history as well |
This file contains hidden or 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
nmap --script ssl-enum-ciphers -p 443 example.org |
This file contains hidden or 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 os | |
import subprocess | |
from shutil import copyfile | |
def main(): | |
src = '/tmp/src' | |
dest = '/tmp/dest' | |
size_dir = 190 |
This file contains hidden or 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
# For big dumps: | |
mysqldump -h <host> -u <user> -p --net_buffer_length=1M --quick <database> <table> > <dump>.sql |
This file contains hidden or 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 -showcerts -connect server.edu:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem |
This file contains hidden or 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
widget.content.gtk-theme-override string Adwaita |
This file contains hidden or 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
export const toQueryString = (params) => { | |
if (!params) { | |
return '' | |
} | |
if (!Object.keys(params).length) { | |
return '' | |
} |
This file contains hidden or 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
function getParameterByName(name, url) { | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); | |
if (!results) return ''; | |
if (!results[2]) return ''; | |
return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
} |
This file contains hidden or 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
sudo vim /etc/default/grub | |
GRUB_CMDLINE_LINUX="ipv6.disable=1 rd.lvm.lv=cl_workstation/root rd.lvm.lv=cl_workstation/swap loglevel=7 systemd.log_level=debug" | |
sudo grub2-mkconfig -o /boot/grub2/grub.cfg |