Skip to content

Instantly share code, notes, and snippets.

View jsownz's full-sized avatar

Jason Sohl jsownz

View GitHub Profile
@jsownz
jsownz / before.rules
Created March 30, 2022 16:38
ufw before.rules to block specific IPs and to auto block malicious
# Block specific
-A ufw-before-input -s 106.0.38.42 -j DROP
-A ufw-before-input -s 37.187.118.21 -j DROP
-A ufw-before-input -s 54.37.9.221 -j DROP
-A ufw-before-input -s 80.19.177.242 -j DROP
-A ufw-before-input -s 154.89.5.18 -j DROP
-A ufw-before-input -s 36.72.216.107 -j DROP
-A ufw-before-input -s 36.72.217.130 -j DROP
-A ufw-before-input -s 36.72.217.22 -j DROP
-A ufw-before-input -s 36.72.218.140 -j DROP
@jsownz
jsownz / email regex
Created August 13, 2019 18:48
regex for validating emails
var email = //whatever input;
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if ( !re.test(email) ) {
// handle error
}

Keybase proof

I hereby claim:

  • I am jsownz on github.
  • I am jsownz (https://keybase.io/jsownz) on keybase.
  • I have a public key ASBdLR99qdbhRdK0Zl0ANRIEdNp_y6gAqW79-XyqOL9MIwo

To claim this, I am signing this object:

@jsownz
jsownz / Kali on Chromebook (Acer 13 Tegra).md
Last active August 9, 2016 16:57
Installing Kali on Acer Chromebook 13

Download ARM image for Acer (make sure it's the acer one)


Acer Arm Image

Making the drive


$ diskutil list

Plug in the USB drive. In a Terminal window, execute this command:

@jsownz
jsownz / gist:b0ed4bc8f9de2351a60f
Last active August 29, 2015 14:07
Timer code
/* Here's the structure */
<div class="timer-bar table">
<div class="game-title table-cell vAM">
GUESS THE PASSWORD!
</div>
<div class="table-cell vAM">
<div class="game-timer-c">
<div class="filler" style="width: 100%;">
<div class="timer" data-starttime="90">90</div>
</div>
#
# deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted
#deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
if
@jsownz
jsownz / install-node-and-npm-no-sudo.md
Last active December 22, 2015 10:08
modified version of (https://gist.github.com/dwayne/2983873) to install npm & node on Ubuntu 13.04 without sudo and then script to update

#Installing NPM and Node on Ubuntu 13.04 without sudo

###Make Directories $ mkdir ~/Downloads $ mkdir -p ~/local/node

###Change to Downloads directory $ cd ~/Downloads

###Download latest node package and unpack it