Skip to content

Instantly share code, notes, and snippets.

View cmbaughman's full-sized avatar
🎯
Focusing

Chris Baughman cmbaughman

🎯
Focusing
View GitHub Profile
@cmbaughman
cmbaughman / cleanup.sh
Last active May 11, 2020 21:32
Recover Free Space in Linux
sudo apt autoremove
sudo apt clean
sudo apt-get autoclean
sudo journalctl --vacuum-time=3d
rm -rf ~/.cache/thumbnails/*
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
@JeremyMorgan
JeremyMorgan / getbadguys.sh
Created February 8, 2020 04:35
Get a list of IP addresses trying to attack your CentOS server
#/usr/bin/bash
# strings to look for in our file
# Note: you could just parse the whole file. But if you put in a bad password your IP
# could end up on the bad guy list
declare -a badstrings=("Failed password for invalid user"
"input_userauth_request: invalid user"
"pam_unix(sshd:auth): check pass; user unknown"
"input_userauth_request: invalid user"
"does not map back to the address"
"pam_unix(sshd:auth): authentication failure"
#!/usr/bin/env ruby
require 'httparty'
FILELIST = [
'/dropbox.zip',
'/robots.txt', # Not from the original list - this serves as a sanity check as it usually exists
'/css/business-frontpage.css',
'/newphase.zip',
'/Doc.zip',
'/wp-content.zip',
@cmbaughman
cmbaughman / README.md
Created March 20, 2019 23:33 — forked from takikoo/README.md
Export bookmarks from Google Chrome with a batch script

Export chrome bookmarks

This is a script to export bookmarks from the web browser Google Chrome to a users home drive in a Windows environment with clients and domain controllers. Most of the script comes from this article

Instruction

  • Double-click on the bat-file.
  • Go the home drive on the users new computer.
  • Double-click on openChromeFolder.bat which will take you to the chrome directory on that machiene.
  • Copy the file Bookmarks to the newly opened window.
@cmbaughman
cmbaughman / CMBUtil.js
Created January 21, 2019 20:58
Vanilla Javascript Utilities
class CMBUtil {
static isNullOrEmpty(tmp) {
return (!tmp || 0 === tmp.length);
}
static isUndefined(tmp) {
return (typeof(tmp) === 'undefined');
}
static isNumeric(n) {
** Collection #1 passwords list **
Hello everyone,
Recently, a dark web monitoring firm 4iQ discovered a massive trove of 41GB data file containing 1.4 billion billion login credentials including emails and passwords in clear-text format.
This db was already found in the dark net during january and succefully removed from the internet but it has been newly uploaded.
magnet:?xt=urn:btih:7ffbcd8cee06aba2ce6561688cf68ce2addca0a3&dn=BreachCompilation&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fglotorrents.pw%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337
- follow me on https://twitter.com/criptixo :)
@bzub
bzub / 20180819-crostini_sommelier_fix.md
Last active January 18, 2025 11:01
Fix Crostini Wayland/X (sommelier) service

If you can't get X11 or Wayland GUI Linux apps to start anymore on Chrome OS, try the following.

In the Terminal app, this will show the status of your systemd user services/units:

systemctl --user

If [email protected] and [email protected] show a failed status, the following worked for me:

sudo ln -s /opt/google/cros-containers/bin/sommelier.elf /usr/bin/
@alexxxdev
alexxxdev / gist:1dd024cadea091ca64154f9616d5739a
Created August 16, 2018 15:08
remote: fatal: pack exceeds maximum allowed size
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
@cmbaughman
cmbaughman / PRMerge.md
Created May 4, 2018 14:58
Locally merge a Git pull request.

Check out, review, and merge locally

  1. Fetch and check out the branch for this merge request
git fetch origin
git checkout -b servtest origin/servtest
@cmbaughman
cmbaughman / laravel.sh
Last active May 2, 2018 14:30
Set up laravel on lamp
# These are just the commands to run
# This isn't intended to run as a script
## Install php mysql and apache2
sudo apt-get update && sudo apt-get -y install software-properties-common python-software-properties
sudo apt-add-repository -y ppa:ondrej/php && sudo apt-get update
sudo apt-add-repository -y ppa:git-core/ppa && sudo apt-get update
export DEBIAN_FRONTEND=noninteractive
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password mysql_password'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password mysql_password'