Skip to content

Instantly share code, notes, and snippets.

View marktheunissen's full-sized avatar

Mark Theunissen marktheunissen

View GitHub Profile
@marktheunissen
marktheunissen / 0_reuse_code.js
Created August 13, 2014 14:07
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marktheunissen
marktheunissen / ls.sh
Created April 2, 2015 09:31
5592aa63-54d9-4d25-9445-196a20b9d558 tmp files
View ls.sh
[mark@endpointf2e4f62a tmp]$ find /tmp -maxdepth 1 -user ee1e319c567d43489dd4d3d5443e711f -ls
655920 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:00 /tmp/info-html.tmp
656201 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html1.tmp
656482 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html2.tmp
656514 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html3.tmp
656758 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html4.tmp
656903 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/info-html5.tmp
659716 0 -rw-r--r-- 1 ee1e319c567d43489dd4d3d5443e711f ee1e319c567d43489dd4d3d5443e711f 0 Apr 1 05:01 /tmp/i
@marktheunissen
marktheunissen / mymodule.drush.php
Last active September 28, 2015 21:59
Examine frequency of characters in Drupal code
View mymodule.drush.php
<?php
/**
* Implements hook_drush_command().
*/
function mymodule_drush_command() {
$items['text-analysis'] = array(
'description' => 'Analyse text.',
'aliases' => array('ta'),
);
@marktheunissen
marktheunissen / gist:3194848
Created July 28, 2012 21:22 — forked from clintel/gist:1155906
Fenced code in bullet lists with GitHub-flavoured MarkDown??
View gist:3194848

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@marktheunissen
marktheunissen / gist:3628666
Created September 5, 2012 00:57 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:3628666

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@marktheunissen
marktheunissen / ember.js
Last active December 11, 2015 02:39
Ember.js 2013-01-13 21:57:54 -0800
View ember.js
// Version: v1.0.0-pre.2-395-ge4af09e
// Last commit: e4af09e (2013-01-13 21:57:54 -0800)
(function() {
/*global __fail__*/
/**
Ember Debug
@marktheunissen
marktheunissen / ember.js
Created January 15, 2013 20:57
Ember.js 2013-01-15 10:06:03 -0800
View ember.js
// Version: v1.0.0-pre.2-398-g1051f2f
// Last commit: 1051f2f (2013-01-15 10:06:03 -0800)
(function() {
/*global __fail__*/
/**
Ember Debug
@marktheunissen
marktheunissen / ember.js
Created January 15, 2013 20:53
Ember.js 2013-01-13 21:57:54 -0800
View ember.js
// Version: v1.0.0-pre.2-395-ge4af09e
// Last commit: e4af09e (2013-01-13 21:57:54 -0800)
(function() {
/*global __fail__*/
/**
Ember Debug
@marktheunissen
marktheunissen / gist:5784425
Created June 14, 2013 19:12
Patch for simplesaml auth
View gist:5784425
diff --git a/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module b/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
index 05ceba3..f9b7d3f 100644
--- a/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
+++ b/sites/all/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
@@ -159,6 +159,11 @@ function simplesamlphp_auth_init() {
global $_simplesamlphp_auth_saml_config;
global $_simplesamlphp_auth_saml_version;
+ // Bail on pages that aren't concerned with user login.
+ if (arg(0) !== 'saml_login' && arg(0) !== 'user' && arg(0) !== 'my-account') {
@marktheunissen
marktheunissen / install_ruby_rpi.sh
Created July 21, 2016 17:46 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.3 on the Raspberry Pi (Raspbian)
View install_ruby_rpi.sh
#!/bin/bash
# -----------------------------------------------------------------------
# Installs Ruby 2.3 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s raw_script_url_here)
# -----------------------------------------------------------------------
# Set up variables