Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Dasque edasque

View GitHub Profile
View tree.css
/*Now the CSS*/
* {margin: 0; padding: 0;}
.tree ul {
padding-top: 20px; position: relative;
transition: all 0.5s;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
}
@edasque
edasque / pre-commit
Last active May 8, 2017
pre-commit Git hook to JSONlint - place it in .git/hooks
View pre-commit
#!/bin/sh
git diff-index -z --cached HEAD --name-only --diff-filter=ACMRTUXB |
xargs -0 -t -L1 /usr/local/bin/jsonlint -c;
if [ "$?" != "0" ]; then
echo "\nOne or more JSON file didn't pass jsonlint'ing.";
echo "Fix them before committing. If it is not possible to fix them all commit with the option --no-verify.";
exit 1;
@edasque
edasque / gist:bd8aa4087c843e31e38d
Created Aug 30, 2014
Phonegap / Cordova Logcat - filtering
View gist:bd8aa4087c843e31e38d
adb logcat CordovaActivity:V CordovaWebView:V CordovaWebViewClient:V IceCreamCordovaWebViewClient:V CordovaLog:V *:S
@edasque
edasque / gist:1c8a8b653014ee158202
Last active Feb 14, 2017
HTML/JS/CSS snippet for listing dashboard in a Grafana text panel (in HTML mode)
View gist:1c8a8b653014ee158202
<style type="text/css">
#dashboard_list ul {
margin:20px, 40px, 40px, 10px;
overflow:hidden;
}
#dashboard_list li {
line-height:1.5em;
float:left;
display:inline;
}
@edasque
edasque / overwrite_graphite_metric.coffee
Created Aug 29, 2014
This will overwrite metrics data in Graphite. Proceed with caution. Look at and understand the different constants. Here there be dragons. You've been warned
View overwrite_graphite_metric.coffee
_ = require('lodash')
request = require('request')
exec = require('child_process').exec
host = "your graphite host"
port = 2003
metric = "full.metric.name"
View docker_volume.md

With the following Dockerfile:

FROM debian:jessie
RUN cd /opt && mkdir nodebb
WORKDIR /opt/nodebb
RUN date > container_created.txt
CMD date > container_lastrun.txt ; /bin/bash

I built an image:

@edasque
edasque / uber_background_darken_widget.coffee
Created Sep 1, 2014
Makes the background darker for all widgets
View uber_background_darken_widget.coffee
command: ""
refreshFrequency: 160000
style: """
z-index:-1
color: #ccf
min-width: 100%
min-height: 100%
font-family: Helvetica Neue
You can’t perform that action at this time.