Skip to content

Instantly share code, notes, and snippets.

@johnny13
johnny13 / ansi.php
Last active October 1, 2021 19:27 — forked from sparksp/ansi.php
ANSI
<?php
/**
* ANSI
*
* Methods to format console output using ANSI escape codes.
* Including methods to use 256bit ANSI Color Codes.
*
* <code>
* // Without included text...
@johnny13
johnny13 / linux-tools.sh
Created April 2, 2021 13:38 — forked from AnnoyingTechnology/linux-tools.sh
Linux server basic tools installation
apt install -y apt install rsync nload htop iotop lynx curl
lm-sensors screen ncdu jq lbzip2 pigz unzip s-tui ethtool build-essential
smartmontool hddtemp lmsensor
# for stretch
# python-pip
# pip install s-tui
CREATE AN APP
1.a
laravel new APPNAME
1.b: or:
composer create-project laravel/laravel APPNAME
cmd:
cd name-of-your-project
php artisan -v
@johnny13
johnny13 / bash_skeleton.sh
Created July 26, 2020 22:12 — forked from sempervent/bash_skeleton.sh
A skeleton for bash Scripts
#!/usr/bin/env bash
# ex: set fdm=marker
# usage {{{1
#/ Usage:
#/ -h|-?|--help)
#/ show this help and exit
#/
# 1}}}
# environment {{{1
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
@johnny13
johnny13 / template.html
Last active July 8, 2020 15:33 — forked from alexpacini/template.html
Custom StackEdit.io Handlebars template. Used for exporting to HTML.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{files.0.name}}</title>
<style>
@font-face{font-family:KaTeX_AMS;src:url(/static/fonts/KaTeX_AMS-Regular.e78e28b.woff2) format("woff2"),url(/static/fonts/KaTeX_AMS-Regular.7f06b4e.woff) format("woff"),url(/static/fonts/KaTeX_AMS-Regular.aaf4eee.ttf) format("truetype");font-weight:400;font-style:normal }@font-face{font-family:KaTeX_Caligraphic;src:url(/static/fonts/KaTeX_Caligraphic-Bold.4ec58be.woff2) format("woff2"),url(/static/fonts/KaTeX_Caligraphic-Bold.1e802ca.woff) format("woff"),url(/static/fonts/KaTeX_Caligraphic-Bold.021dd4d.ttf) format("truetype");font-weight:700;font-style:normal }@font-face{font-family:KaTeX_Caligraphic;src:url(/static/fonts/KaTeX_Caligraphic-Regular.7edb53b.woff2) format("woff2"),url(/static/fonts/KaTeX_Caligraphic-Regular.d3b46c3.woff) format("woff"),url(/static/fonts/KaTeX_Caligraphic-Regular.d49f2d5.ttf) format("truetype");font-weight:400;font-style:normal }@font-face{font-family:KaTeX_Fraktur;src:url(/static/fon
@johnny13
johnny13 / ascii-rainbow.md
Created June 12, 2019 19:44 — forked from cnnrrss/ascii-rainbow.md
ASCII Rainbow

Taste the Rainbow

for (( i = 30; i &lt; 38; i++ )); do echo -e "\033[0;"$i"m Normal: (0;$i); \033[1;"$i"m Light: (1;$i)"; done &amp;&amp; echo -e "\033[0m"

@johnny13
johnny13 / nginx-wp-rewrite-uploads.conf
Last active January 18, 2018 21:16 — forked from petertoi/nginx-wp-rewrite-uploads.conf
Nginx rewrite to request WordPress uploads from external domain
server {
listen 80;
listen 443 ssl http2;
server_name .myriad.app;
root "/home/vagrant/code/myriad";
index index.html index.htm index.php;
charset utf-8;
@johnny13
johnny13 / ffmpeg-2.8.sh
Last active January 12, 2018 03:56 — forked from wpsmith/ffmpeg-2.8.sh
Install ffmpeg on MacOS with all the bells and whistles
# Installs Homebrew (3.4.1 as of Jan 11th 2018)
brew install ffmpeg --with-fdk-aac --with-game-music-emu --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 --with-dcadec --with-faac --with-font-config --with-frei0r --with-libbluray --with-libbs2b --with-libcaca --with0libsoxr --with-openjpeg --with-openssl --with-theora --with-webp --with-tools
@johnny13
johnny13 / wp-config.php
Created January 9, 2018 02:00 — forked from ifamily/wp-config.php
A universal WordPress wp-config.php which works on local development to staging and production server environments.
<?php
/*
One wp-config for local development to staging to production.
*/
// Define Environments
$environments = array(
<?php
$email = (new WP_Mail)
->to('john.doe@gmail.com')
->subject('WP_Mail is great!')
->template(get_template_directory() .'/emails/demo.html', [
'name' => 'John Doe',
'location' => 'London',
'link' => 'http://github.com/anthonybudd/WP_Mail'
])