Skip to content

Instantly share code, notes, and snippets.

View johnny13's full-sized avatar

Derek johnny13

View GitHub Profile
#!/usr/bin/env bash
########################[ PROMPT COLOR CODES ]#######################
if tput setaf 1 &> /dev/null; then
tput sgr0; # reset colors.
BLK="$(tput setaf 0)" # Black - Regular
RED="$(tput setaf 124)" # Red
GRN="$(tput setaf 64)" # Green
@johnny13
johnny13 / dircolors
Last active September 8, 2021 19:32
my dark background friendly dir colors
#############################################################################
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
#
# -------------- [ ATTRIBUTES ] --------------
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#!/bin/bash
##################################################################################
# BASH MENU MAKER
# MAKES THINGS PRETTY
##################################################################################
export COLS="$(tput cols)"
if [ "$(tput cols)" -lt "120" ]; then
@johnny13
johnny13 / .bash_alias_osx
Last active January 4, 2017 19:05
MacOS bash aliases for File, List and Disk functions
#
## Shortcuts
alias d="cd ~/Documents/Dropbox"
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p="cd ~/projects"
alias g="git"
alias h="history"
alias j="jobs"
@johnny13
johnny13 / install nano.sh
Last active December 18, 2016 21:30 — forked from BlakeGardner/install nano.sh
Syntax highlighting in nano on Mac OS X
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install `wget` with IRI support.
brew install wget --with-iri
# install nano from homebrew
brew install nano
# update your nanorc file with the contents of the nanorc file below
@johnny13
johnny13 / install.sh
Created January 7, 2017 09:09 — forked from mshick/install.sh
Installing Node.js with Homebrew and nvm
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install nvm
brew install nvm
# Export nvm environment
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
@johnny13
johnny13 / keybase.md
Created October 25, 2017 08:45 — forked from anonymous/keybase.md
keybase.md

Keybase proof

I hereby claim:

  • I am johnny13 on github.
  • I am thirt13n (https://keybase.io/thirt13n) on keybase.
  • I have a public key ASAbuv-9281qzftOHOFT9qzbT9_EC7c1idYI5hNuMNThvAo

To claim this, I am signing this object:

@johnny13
johnny13 / add_dashboard_menu.php
Created November 29, 2017 11:29 — forked from sabbir1991/add_dashboard_menu.php
Adding a Main Dashboard Menu in Dokan Dashboard
<?php
add_filter( 'dokan_query_var_filter', 'dokan_load_sabbir_menu' );
function dokan_load_sabbir_menu( $query_vars ) {
$query_vars['sabbir'] = 'sabbir';
return $query_vars;
}
add_filter( 'dokan_get_dashboard_nav', 'dokan_add_sabbir_menu' );
@johnny13
johnny13 / load_settings_menu.php
Created November 29, 2017 11:29 — forked from sabbir1991/load_settings_menu.php
Add extra menu in Settings menu in Dokan Dashboard
<?php
/** Adding Settings extra menu in Settings tabs Dahsboard */
add_filter( 'dokan_get_dashboard_settings_nav', 'dokan_add_settings_menu' );
function dokan_add_settings_menu( $settings_tab ) {
$settings_tab['nayem'] = array(
'title' => __( 'Nayem', 'dokan'),
'icon' => '<i class="fa fa-user"></i>',
<?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'
])