Skip to content

Instantly share code, notes, and snippets.

View mikepsinn's full-sized avatar
💭
Attaining universal consciousness

Mike P. Sinn mikepsinn

💭
Attaining universal consciousness
View GitHub Profile
PHP 17 hrs 58 mins ██████████▍░░░░░░░░░░ 49.5%
JavaScript 6 hrs 6 mins ███▌░░░░░░░░░░░░░░░░░ 16.8%
Other 3 hrs 26 mins █▉░░░░░░░░░░░░░░░░░░░ 9.5%
YAML 2 hrs 7 mins █▏░░░░░░░░░░░░░░░░░░░ 5.8%
HTML 1 hr 36 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5%
@mikepsinn
mikepsinn / did:3:kjzl6cwe1jw1487172o2ukeg5fx3jrc9mt0w9lwjk4hnx2jlznyk3w5gy5zu6k8
Created April 28, 2022 02:32
did:3:kjzl6cwe1jw1487172o2ukeg5fx3jrc9mt0w9lwjk4hnx2jlznyk3w5gy5zu6k8
did:3:kjzl6cwe1jw1487172o2ukeg5fx3jrc9mt0w9lwjk4hnx2jlznyk3w5gy5zu6k8
@mikepsinn
mikepsinn / install-choco-script.bat
Last active August 6, 2021 19:20 — forked from zaccb/install-choco-script.bat
Chocolatey install script
:: Install choco .exe and add choco to PATH
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install all the packages
:::: Browsers
choco install googlechrome -fy
choco install firefox -fy
:::: Text editors / IDEs
choco install atom -fy
@mikepsinn
mikepsinn / Jenkinsfile
Created July 21, 2021 18:32 — forked from stormisOld/Jenkinsfile
Jenkinsfile for php static analysis using docker
#!/usr/bin/env groovy
properties([
pipelineTriggers([
triggers: [
[
$class: 'com.cloudbees.jenkins.plugins.BitBucketTrigger',
]
]
]),
@mikepsinn
mikepsinn / no-root.sh
Created July 3, 2021 03:38
die if root
#!/bin/bash
if [[ $EUID -eq 0 ]]; then
echo
echo "================ Error ================="
echo "Do not run this as the root user"
echo "========================================"
echo
exit 1
fi
#!/usr/bin/env bash
# Run with `curl https://gist.githubusercontent.com/mikepsinn/f4d11ef930e62586bf24f15955bd44ea/raw/settler-provision.sh`
export DEBIAN_FRONTEND=noninteractive
# Update Package List
apt-get update
# Update System Packages
@mikepsinn
mikepsinn / after.sh
Last active August 22, 2019 17:29
Laravel Homestead Post-Provision Setup
sudo su
sudo sed -i "/^[^#]*Port[[:space:]]22/c\Port 2222" /etc/ssh/sshd_config
sudo sed -i "/^[^#]*PermitRootLogin[[:space:]]no/c\PermitRootLogin yes" /etc/ssh/sshd_config
sudo sed -i "/^[^#]*PasswordAuthentication[[:space:]]no/c\PasswordAuthentication yes" /etc/ssh/sshd_config
sudo service sshd restart
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
echo 'jenkins ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
echo "apt-get update..." && sudo apt-get update >/dev/null
set -x
@mikepsinn
mikepsinn / wait_for_200_response.sh
Last active November 29, 2018 00:25
Checks a url every 30 seconds and sleeps until 200 response
#!/usr/bin/env bash
# You can run from a gist using:
# curl https://gist.githubusercontent.com/mikepsinn/5556d7dc21a255118e53cd59c2037ef1/raw/50276f283f9ac5e6b5b383ce2089090a6f6d119c/wait_for_200_response.sh | bash -s URL_HERE
set -x
until $(curl --output /dev/null --silent --head --fail ${1}); do
echo "Waiting for ${1}"
sleep 30
done
echo "200 from ${1}"
@mikepsinn
mikepsinn / wait_for_200_response.sh
Created November 29, 2018 00:12
Checks a url every 30 seconds and sleeps until 200 response
#!/usr/bin/env bash
set +x
url=${1:-${url}}
#url=https://qm-staging.quantimo.do/ionic/Modo/www/scripts/combined-head-libraries-6fcc81560c.js
echo "CHECKING $url"
timeout=${2:-'3'}
# ^in seconds
flag=${3:-'--status'}
# curl options, e.g. -L to follow redirects
@mikepsinn
mikepsinn / mysql2sqlite.sh
Last active April 29, 2018 02:56 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# curl https://gist.githubusercontent.com/mikepsinn/2bd31d9c8c397c8af895e8c833ea5f32/raw/mysql2sqlite.sh | bash -s --no-data -u root -pMySecretPassWord quantimodo_test | sqlite3 database.sqlite
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.