Skip to content

Instantly share code, notes, and snippets.

View joemackay's full-sized avatar

Joe Okatch joemackay

View GitHub Profile
@joemackay
joemackay / dump.sh
Created January 22, 2024 11:14 — forked from o5/dump.sh
MySQL / MariaDB Dump Helper
#!/usr/bin/env bash
# MySQL / MariaDB Dump Helper
# ===========================
# FEATURES: Progress bar with ETA, support multiple databases (dump into separated files) and password as argument
# REQUIREMENTS:
# =============
# GNU Core Utilities, mysql, mysqldump, pv (https://github.com/icetee/pv)
@joemackay
joemackay / More-links.txt
Created December 6, 2023 18:23 — forked from dreamsparkx/More-links.txt
Install Apache, PHP, MySQL and phpMyAdmin on Mac OS X
@joemackay
joemackay / mac-homebrew-lamp.md
Created October 7, 2022 12:50 — forked from kitloong/mac-homebrew-lamp.md
Mac - Install Apache, PHP, MySQL + phpMyAdmin with Homebrew

!!! This guide was created with Macbook Pro M1. Path may vary for different or even same machine.

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install PHP

@joemackay
joemackay / Count lines in Git repo
Created July 25, 2022 17:45 — forked from mandiwise/Count lines in Git repo
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
#1 Locate gitconfig file using this command: git config --list --show-origin --show-scope
#2 Add the code snippet below
[alias]
lg = lg1
lg1 = lg1-specific --all
lg2 = lg2-specific --all
lg3 = lg3-specific --all
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
@joemackay
joemackay / fileUpload.vue
Created September 8, 2020 23:01 — forked from raisiqueira/fileUpload.vue
Simple file upload with Vue and Axios
<style>
input[type="file"]{
position: absolute;
top: -500px;
}
div.file-listing{
width: 200px;
}
@joemackay
joemackay / ssh.md
Created August 11, 2020 21:38 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

tier_basic
id (serial) : level
********************
1_b (10) : 1
3_b (11) : 2
6_b (12) : 3
12_b(13) : 4
tier_standard
1_s (14) : 1
@joemackay
joemackay / attack_urls.txt
Created April 7, 2020 21:36 — forked from acosonic/attack_urls.txt
Comprehensive list of attack/probe URL's
#This was done by some tool, don't know which one, and our custom built app captured theese URL's, after filtering
#for unique URL's, here is list of URL's in original form, I will later try to create some protection
/3B1728A10D221805D2CABE58B095D353.php
/manager/html
/wp-content/plugins/portable-phpmyadmin/wp-pma-mod/index.php
/mysql/mysqlmanager/index.php
/mysql/sqlmanager/index.php
/mysql/dbadmin/index.php
/mysql/admin/index.php
/phpmy/index.php
@joemackay
joemackay / gettoken.sh
Created March 19, 2020 23:53 — forked from eruffaldi/gettoken.sh
Google OAuth 2.0 full example bash script.
#!/bin/bash
#1) on https://console.developers.google.com/ register project and associate API from library
# OUTPUT: client_id,client_secret
client_id="..."
client_secret="...."
#2) get authorization code at the following link using web browser
# OUTPUT: code
scope="https://www.googleapis.com/auth/drive"