Skip to content

Instantly share code, notes, and snippets.

Jens Riisom Schultz Ibmurai

  • Denmark
Block or report user

Report or block Ibmurai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Ibmurai /
Created May 8, 2018
Fish function to convert a letter to a TV 2 team
function tv2e
switch "$argv"
case 'a'
echo "playfe"
case 'b'
echo "is"
case 'c'
echo "cms"
case 'd'
echo "app"
Ibmurai /
Created Feb 7, 2017
Is tvtid backend good?
if [ $(curl -s -H "Accept: application/json" | grep "{},") ]; then
echo "It's bad!!"
echo "It's good!"
Ibmurai /
Created Jan 19, 2017
Full docker cleanup - remove every image and container
docker stop $(docker ps -aq --filter status=running)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
Ibmurai /
Created Jan 19, 2017
Non destructive docker cleanup
docker rm $(docker ps -aq --filter status=exited)
docker rmi $(docker images -f "dangling=true" -q)
Ibmurai / fixstuff.php
Created Sep 27, 2012
Fix all calls to htmlentities and htmlspecialchars, if you want to do ISO-8859-1 on PHP 5.4 or just be prepared.
View fixstuff.php
function getDirectoryList($dir, $skipExtensions = []) {
$dirList = $fileList = [];
if ($dfp = opendir($dir)) {
while (($entry = readdir($dfp)) !== false) {
$skip = false;
foreach ($skipExtensions as $extension) {
if (substr($entry, strlen($entry) - strlen($extension)) === $extension) {
Ibmurai / php-log-highlight.php
Created Apr 27, 2012
PHP apache error log highlighter
View php-log-highlight.php
* Usage: tail -f /var/log/apache2/error.log | php-log-highlight
ini_set('display_errors', E_ALL & ~E_STRICT);
// Dependencies
require_once 'Console/Color.php';
Ibmurai / lol.php
Created Feb 20, 2012
php unnamed variable and silly stdClass casting
View lol.php
$lol = null;
$$lol->enabled = true;
/* Output:
PHP Strict Standards: Creating default object from empty value in /Users/ibmurai/lol.php on line 4
Ibmurai / lol.js
Created Feb 6, 2012
A basic pattern for jQuery plugins
View lol.js
(function($) {
$ = function() {
var scope = function($this) {
var f = {
* The "constructor"
init : function() {
Ibmurai / PHP - finding escaped backslashes
Created Aug 19, 2011
PHP, regex and double quoted strings are fun...
View PHP - finding escaped backslashes
/* This handy script lets you locate escaped backslashes in the prettiest way. */
$input = $_POST['value'];
$matches = array();
if (preg_match("/\\\\/", $input, $matches)) {
} else {
You can’t perform that action at this time.