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 / 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 / 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 = '';
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
@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)
@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 / path.md
Created July 2, 2019 18:46
Split items in your shell path per line
echo $PATH | tr ":" "\n"