Skip to content

Instantly share code, notes, and snippets.

🚐
volkswagen testing

Michael Trouw michahell

🚐
volkswagen testing
Block or report user

Report or block michahell

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
View Theming-Slack-OSX.md

Theming Slack for OSX

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

How to (OSX Only)

@michahell
michahell / easing.js
Created Dec 20, 2016 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
View easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@michahell
michahell / gist:e6a60980394428da4e1e2472a71803e8
Created Nov 24, 2016 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:e6a60980394428da4e1e2472a71803e8
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@michahell
michahell / prims.js
Created Oct 23, 2016 — forked from methodin/prims.js
Prim's Algorithm
View prims.js
// Represents an edge from source to sink with capacity
var Edge = function(source, sink, capacity) {
this.source = source;
this.sink = sink;
this.capacity = capacity;
};
// Main class to manage the network
var Graph = function() {
this.edges = {};
@michahell
michahell / color-conversion-algorithms.js
Created Oct 19, 2016 — forked from mjackson/color-conversion-algorithms.js
RGB, HSV, and HSL color conversion algorithms in JavaScript
View color-conversion-algorithms.js
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@michahell
michahell / brew cask install --all
Created Sep 27, 2016
brew cask reinstall everything
View brew cask install --all
brew cask install --force $(brew cask list)
View keybase.md

Keybase proof

I hereby claim:

  • I am michahell on github.
  • I am michahell (https://keybase.io/michahell) on keybase.
  • I have a public key ASB8qALtw0hvE4VRNKqJloZZ1lXxsCXzrm8YCa2p4vsmDQo

To claim this, I am signing this object:

View tips_SPARQL.md

Virtuoso and some other SPARQL endpoint software extend the SPARQL 1.1 spec with some custom functions. one of them is free text search, which is INCREDIBLY much more faster than using regular expression text searches on, for example, DBPedia.

Here is an example SPARQL query for DBPedia using regex's :

SELECT DISTINCT ?film ?some_studio ?some_producer
WHERE {
    ?film rdf:type <http://dbpedia.org/ontology/Film> .
    ?film foaf:name ?film_title .
    FILTER regex(str(?film_title), "\\bArgo\\b") .
View tips_ST2.md

Viewing images in ST2

THIS Sublime Text 2 plugin

Enables you to view images from ST2 directly using a menu command or the hotkey combo CMD + SHIFT + SPACE. Since it uses the native OSX quick look functionality you can practically view anything that quick look can display!

TODO's in ST2

I've become used to adding TODO's since Flash Builder so i sought an alternative for sublime text 2, here among others. I've found one that's great and isn't tied to user- or application wide settings but can be project-specific: SublimeTODO. install it using the Sublime Package Manager and further instructions are to be found in the github readme.

@michahell
michahell / tips_MySQL.md
Last active Sep 28, 2015
MySQL SHOW databases alias
View tips_MySQL.md

If you ever need to execute the following SQL statement in MySQL:

SHOW databases; or especially SHOW databases LIKE 'somePrefix_%'; and you want to alias or name the returned dataset, you can't do that with the SHOW statements as they are very limited. You can however do this if you make use of the INFORMATION_SCHEMA default MySQL table:

SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'somePrefix_%';

You're welcome!

You can’t perform that action at this time.