Skip to content

Instantly share code, notes, and snippets.

View khebbie's full-sized avatar

Klaus Hebsgaard khebbie

View GitHub Profile
@anissen
anissen / zappa-processing.coffee
Created January 8, 2012 12:12
Processing.js demonstration (server included) using zappa, coffeekup and node.js in 30 (!) lines of code
require('zappa') ->
@get '/': -> @render 'index', layout: no
@view index: ->
doctype 5
html ->
head ->
title 'Zappa + CoffeeKup + Processing'
style '''body { background-image:url('http://icanhasnoise.com/1d0b07-4a2219/40x1500/4'); text-align: center; } header { font-family: 'Lobster Two', cursive; font-size: 28px; color: white; text-shadow: 3px 3px 3px brown; }'''
link rel: 'stylesheet', href: 'http://fonts.googleapis.com/css?family=Lobster+Two&v2'
script src: 'http://processingjs.org/content/download/processing-js-1.3.6/processing-1.3.6-api.min.js'
@masha256
masha256 / README.md
Last active August 3, 2017 08:53
Google Column Chart for Dashing

Description

A Dashing widget to show a Google Visualizations Column Chart on a dashboard.

Installation

Copy the google_column.coffee, google_column.html and google_column.scss file to into /widgets/google_column directory.

Add the following to the dashboard layout file:

@favadi
favadi / build-emacs.sh
Last active June 5, 2021 15:25
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
@bmatthewshea
bmatthewshea / show_ssl_expire
Last active March 1, 2023 22:13
Retrieve/Check SSL certificate expiration date(s)
#!/bin/bash
# By B Shea Dec2018 & Mar2020
# https://www.holylinux.net
# Test for OpenSSL - if not installed stop here.
if ! [[ -x $(which openssl) ]]; then
printf "\nOpenSSL not found or not executable.\nPlease install OpenSSL before proceeding.\n\n"
exit 1
fi
@rstackhouse
rstackhouse / gist:1162357
Created August 22, 2011 13:22
Configure NLog Programmatically
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLog;
using NLog.Common;
using NLog.Targets;
using NLog.Config;
namespace ConsoleApplication1
@lshoo
lshoo / gist:9785645
Created March 26, 2014 15:13
Slick2 generic dao
package slicks.docs.dao
import scala.slick.driver.PostgresDriver.simple._
import scala.slick.driver._
trait Profile {
val profile: JdbcProfile
}
@dshnkao
dshnkao / umenu
Last active December 19, 2023 14:59
open firefox history using fzf or rofi
#!/usr/bin/env bash
# Relying on rofi / fzf is a bit limited
# e.g
# umenu "places.sqlite" "rofi -dmenu --no-sort"
# umenu "places.sqlite" "fzf --no-sort --exact"
DB_PATH=${1:?ARG 1: path to firefox database}
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@jdkanani
jdkanani / notepad.html
Last active April 6, 2024 17:09 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`