Skip to content

Instantly share code, notes, and snippets.

Martin Hansen mokkabonna

Block or report user

Report or block mokkabonna

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 debug.md
View gist:ef357356a1da71ae0781278ba6ceddd7
# Atom Beautify - Debugging information
The following debugging information was generated by `Atom Beautify` on `Fri Dec 01 2017 14:25:19 GMT+0100 (Vest-Europa (normaltid))`.
---
## Table Of Contents
- [Versions](#versions)
- [Original file to be beautified](#original-file-to-be-beautified)
- [Original File Contents](#original-file-contents)
View gist:d0875e8a85c3ff2c1b2f
update-alternatives: using /usr/lib/nvidia-349-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-349-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
View gist:7ebf99590e42fcee9dfe
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "intel"
Driver "intel"
BusID "PCI:0@0:2:0"
View gist:998a227553c8a6714f67
sudo apt-get install --no-install-recommends mutter
mutter --replace
@mokkabonna
mokkabonna / json_merge.coffee
Last active Sep 23, 2016 — forked from jphaas/json_merge.coffee
json auto merge
View json_merge.coffee
#To install:
#
#Requires coffe script installed globally: sudo npm install -g coffee-script
#
#In your git configuration (for instance, .git/config to do it at the project level), add:
#
#[merge "json_merge"]
# name = A custom merge driver for json files
# driver = coffee json_merge.coffee %O %A %B
# recursive = binary
View gist:4205a724033842a3496a
{
"adresse": "MARIDALSVEIEN 2",
"tiltak": {
"beslutningsTre": {
"id": "5",
"label": "Tiltaksliste ved bevaringsverdig eiendom",
"multipleSelect": true,
"beslutninger": [{
"id": "6",
"label": "Bytte vindu eller dør",
@mokkabonna
mokkabonna / gist:301e53b19e726fb9dd7e
Last active Aug 29, 2015
sinon shorter stack errors, add in assert.fail
View gist:301e53b19e726fb9dd7e
fail: function fail(message) {
var error = new Error(message);
error.name = this.failException || assert.failException;
try{
throw error;
} catch(e) {
if (error.stack){
console.log(error.stack);
error.stack = error.stack.split('\n').slice(0,20).join('\n')
View responsive-table
<style>
table {
width:100%;
}
@media (max-width: 500px) {
table tr th {
float:left;
width:50%;
clear:left;
}
@mokkabonna
mokkabonna / expect-promise.js
Created Mar 16, 2014
promises for expect.js
View expect-promise.js
var eventually = {
expect: function(promise) {
function notBe(expectedValue) {
return promise.then(function(eventualValue) {
expect(eventualValue).not.to.be(expectedValue);
});
}
function be(expectedValue) {
You can’t perform that action at this time.