Skip to content

Instantly share code, notes, and snippets.

View CyberStrike's full-sized avatar
🎯
Building Products

Chris Scott CyberStrike

🎯
Building Products
View GitHub Profile
@CyberStrike
CyberStrike / path.md
Created July 2, 2019 18:46
Split items in your shell path per line
echo $PATH | tr ":" "\n"
@CyberStrike
CyberStrike / install.sh.md
Last active July 12, 2020 17:29
OSX 10.14 Mojave - Install Php 7.4 w/ Phpbrew
#!/usr/bin/env bash

export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

phpbrew --debug install 7.4 \
 +default \
 +dbs \
 +openssl="$(brew --prefix openssl)" \
 +bz2="$(brew --prefix bzip2)" \
@CyberStrike
CyberStrike / _exists.md
Last active July 3, 2019 18:59
Utility function for checking if a value is truthy
function _exists (thing) {
  const IS_UNDEFINED = 'undefined' === (typeof thing)
  const IS_NULL      = null === thing
  if (IS_UNDEFINED || IS_NULL) return false

  const TYPE = (typeof thing)
  const IS_OBJECT = ('object' === TYPE)
  const IS_STRING = ('string' === TYPE)
 const IS_NUMBER = ('number' === TYPE)
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
@CyberStrike
CyberStrike / bootstrap-pagination.php
Last active May 17, 2017 03:26 — forked from ediamin/bootstrap-pagination.php
Bootstrap Pagination for WordPress
<?php
/*
* custom pagination with bootstrap .pagination class
* source: http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/
*/
function bootstrap_pagination( $custom_query = null, $echo = true ) {
global $wp_query;
$pagination = '';
@CyberStrike
CyberStrike / ColorFunctions.php
Last active April 26, 2017 06:13
PHP Color Functions
<?php
function rgbToHsl(int $r,int $g, int $b ) {
$oldR = $r;
$oldG = $g;
$oldB = $b;
$r /= 255;
$g /= 255;
$b /= 255;
@CyberStrike
CyberStrike / rewritinghistory.sh
Created February 13, 2015 21:47
remove a file from history
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch FILENAME' SHA1..HEAD
@CyberStrike
CyberStrike / .bash_profile
Created December 14, 2014 21:35
My .bash_profile
# Source Git
source /c/'Program Files (x86)'/git/etc/git-completion.bash
source /c/'Program Files (x86)'/git/etc/git-prompt.sh
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.icon-group {
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla downloaded on: Wed Sep 3 03:12:03 2014
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##