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 / wfw.sh
Created November 28, 2020 08:54
Wifi Scanning Script
#!/bin/bash
if [[ "$1" && -f "$1" ]]; then
FILE="$1"
else
echo 'Specify the .csv file to analyze.';
echo 'Usage:';
echo -e "\tbash wfw.sh /tmp/test-01.csv";
exit
fi
@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 / php74.sh
Last active April 28, 2020 00:42
Automated installer for PHP 7.4 (and friends) on Ubuntu 18.04
#!/bin/bash
USAGE=$(cat <<-EOM
___ ___ _____ _ _ ___
/ __| __|_ _| | | | _ |
\__ \ _| | | | |_| | _|
|___/___| |_| \___/|_|
____ _ _ ____ _____ _ _
| _ \| | | | _ \ |___ | || |
| |_| | |_| | |_| | / /| || |_
@johnny13
johnny13 / index.html
Last active April 7, 2020 01:19
ChromeOS Gimp
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ChromedOutGimp</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
@johnny13
johnny13 / HUEMENT
Created August 20, 2019 11:16
Random Number Codes
Randomly Generated Number Strings
13 2509 6516
23 1796 5299
@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"