Skip to content

Instantly share code, notes, and snippets.

View jackdalton's full-sized avatar

Jack Dalton jackdalton

View GitHub Profile
@jackdalton
jackdalton / update.sh
Last active January 10, 2019 14:57
update script
#!/bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
SCRIPTNAME=`basename "$0"`
# if not root then run as root
if (( $EUID != 0 )); then
sudo $SCRIPTPATH/$SCRIPTNAME
exit
fi
@jkullick
jkullick / sqlmap-cheat-sheet.md
Last active February 12, 2024 18:00
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@jackdalton
jackdalton / example-log.txt
Created December 26, 2015 08:14
Update GitHub repo links in a directory
[jack@arch]$ ls -R testdir
testdir:
a.txt testdir2
testdir/testdir2:
b.txt
[jack@arch]$ cat testdir/a.txt
def
[jack@arch]$ cat testdir/testdir2/b.txt
def123
@Earnestly
Earnestly / dealing_with_failed_install.rst
Last active October 17, 2016 18:49
Dealing with Installation Interruptions with Pacman

A Method to Correct Interrupted Installations with Pacman

An upgrade via pacman could be broken down into three phases:

1) Sync

Updates the sync databases with, if any, new packages. These are downloaded from the mirrors usually as gzip files located in /var/lib/pacman/sync such as core.db and extra.db.

@cobyism
cobyism / gh-pages-deploy.md
Last active June 12, 2024 20:14
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).