Skip to content

Instantly share code, notes, and snippets.

View redbonzai's full-sized avatar

Christian redbonzai

View GitHub Profile
@redbonzai
redbonzai / ninjify-command.md
Last active October 8, 2021 15:43
Ninjify the command line with oh-my-zsh

How to Ninjify Your Command Line For Work

The first step is to install a compiler. The easiest way to install one is with the Xcode Command Line Tools package. So, to >do that, we need to open a terminal, and enter the following command …

xcode-select --install

Please note: This article assumes that you are configuring a MAC.

First thing is to install Homebrew.

If you don’t trust the command below, then please navigate to https://brew.sh, and copy the install command, and paste that into your terminal.

<?php
namespace CSID\IMC\Baseline\CoreBundle\Model\Traits;
trait RecursiveSnakeCaseToCamelCaseKeys
{
/**
* Recursively iterate through an array with snake_case keys
@redbonzai
redbonzai / git-cleanup-repo
Created May 2, 2020 13:20 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@redbonzai
redbonzai / History|-1005a045|entries.json
Last active May 7, 2023 22:44 — forked from Juraci/sync-upstream.sh
Bash script to sync a forked project with its upstream repository
{"version":1,"resource":"file:///Users/christiandominguez/prune-special-characters-from-csv-excel.js","entries":[{"id":"XuQo.js","source":"textFileCreate.source","timestamp":1680305107195},{"id":"vf8D.js","timestamp":1680305151543},{"id":"goja.js","timestamp":1680305162964},{"id":"usG3.js","timestamp":1680305193932},{"id":"olbX.js","timestamp":1680305289682},{"id":"fwOa.js","timestamp":1680305351071},{"id":"TPSM.js","timestamp":1680306017799},{"id":"SQvb.js","timestamp":1680306038459}]}
@redbonzai
redbonzai / osx_bootstrap.sh
Created February 17, 2020 11:38 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@redbonzai
redbonzai / class.database.php
Created February 7, 2017 03:25 — forked from jonashansen229/class.database.php
PHP OOP Database class using MySQLI and Singleton pattern. Only one instance of the class will be made, this requires less memory.
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";