Skip to content

Instantly share code, notes, and snippets.

View rikschennink's full-sized avatar

Rik rikschennink

View GitHub Profile
@rikschennink
rikschennink / silence-spotify.sh
Last active October 26, 2015 08:48
Adds Spotify to Notification Center so you can prevent it from showing the notification badge in the menu bar. Credits: http://apple.stackexchange.com/questions/153182/remove-dock-notification-badge-for-apps-not-in-notification-center/194316#194316
# "Usernoted" seems to be the "user notifications daemon", so get it's PID.
pid=$(ps aux | grep -i [u]sernoted | awk '{print $2}')
# Find the sqlite3 database that this program has open. It's in a "private" folder (app sandboxing).
db="$(lsof -p $pid | grep com.apple.notificationcenter/db/db\$ | awk '{print $9}')"
# I got the bundleid from Spotify.app/Contents/Info.plist
bundleid="com.spotify.client"
# I use 0 as the flags because you can change all the settings in System Preferences

Keybase proof

I hereby claim:

  • I am rikschennink on github.
  • I am rikschennink (https://keybase.io/rikschennink) on keybase.
  • I have a public key whose fingerprint is 679B 6933 62E6 CD78 C5A4 3DE9 3FB0 0B55 E5D3 8AEE

To claim this, I am signing this object:

@rikschennink
rikschennink / mq-maming.md
Last active August 29, 2015 14:15
Naming Media Queries

Naming Media Queries

Popular ways of naming media queries:

  • Device (mobile, tablet, desktop)
  • Size (xs ,s, m, l, xl)
  • Anonymous (alpha, beta, gamma)

I've been experimenting with naming the layouts of a module itself.

  • 2 columns
  • 3 columns
@rikschennink
rikschennink / gist:8cd60df31875a7b6c180
Created January 28, 2015 09:10
Sass outline experiment
// Mixins define the various layouts and options of a module, other modules are not allowed to override styles on subnodes of a module.
// HTML
//
// <ol class="article-list">
// <li>
// <article class="article-item">
// <h1>Sass outline experiment</h1>
// <dl>
@rikschennink
rikschennink / plugin-name.js
Created November 20, 2014 07:12
Cordova Plugin API Defintion
(function(cordova){
'use strict';
var exports = {},method;
// Plugin Definition
var plugin = {
name:'<PluginName>',
api:{
// (c) copyright unscriptable.com / John Hann
// License MIT
// For more robust promises, see https://github.com/briancavalier/when.js.
function Promise () {
this._thens = [];
}
Promise.prototype = {