Skip to content

Instantly share code, notes, and snippets.

View centic9's full-sized avatar

Dominik Stadler centic9

View GitHub Profile
@centic9
centic9 / userDefineLang_Gradle.xml
Created September 27, 2012 12:19 — forked from toddb/userDefineLang_Gradle.xml
Gradle language for Notepad++
<NotepadPlus>
<UserLang name="Gradle" ext="gradle">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="yes" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;&apos;0&quot;&apos;0</Keywords>
<Keywords name="Folder+"></Keywords>
@marcboivin
marcboivin / ripdvd.sh
Created November 19, 2012 23:47
Rip Seasons DVD with handbrake
#!/bin/bash
# copyrights this guy http://ubuntuforums.org/showthread.php?t=1544346
# ripdvd.sh
# input must be:
# - <devicename> (which can be anything lsdvd takes)
# - <outputfolder> where do you want the ripped series
# - <outputname> the base name of the output
# - <startsfrom> where to start counting if you use 0 it starts at 1
# (useful for seasons spanning over multiple disks)
@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@troelskn
troelskn / application.coffee
Created December 14, 2013 20:43
Make dashing mobile friendly
# dashing.js is located in the dashing framework
# It includes jquery & batman for you.
#= require dashing.js
#= require_directory .
#= require_tree ../../widgets
console.log("Yeah! The dashboard has started!")
Dashing.on 'ready', ->
@pmorie
pmorie / gist:8027518
Created December 18, 2013 18:41
bash -eu, explained
# Source: http://fvue.nl/wiki/Bash:_Error_handling
#
#!/bin/bash -eu
# -e: Exit immediately if a command exits with a non-zero status.
# -u: Treat unset variables as an error when substituting.
(false) # Caveat 1: If an error occurs in a subshell, it isn't detected
(false) || false # Solution: If you want to exit, you have to detect the error yourself
(false; true) || false # Caveat 2: The return status of the ';' separated list is `true'
(false && true) || false # Solution: If you want to control the last command executed, use `&&'
@aaronkaka
aaronkaka / README.md
Last active March 8, 2020 23:25
Sonar Secured Widget for Dashing Framework

Preview

Screenshot

Description

Dashing widget to display Sonar metrics, connecting to either a secured or unsecured Sonar repository.

I created this widget after originally attempting to use EHadoux's simple Sonar widget, which did not allow access to my company's secured Sonar instance. Additionally, I implemented the ability to set up the widget using an external configuration file.

Please note that this is technically a job versus a widget, in that it periodically requests data from Sonar and pushes that to the list widget as the view.

@nolanlawson
nolanlawson / completion-for-gradle.md
Last active April 5, 2024 07:43
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
@ondrej-kvasnovsky
ondrej-kvasnovsky / commands.md
Last active April 25, 2020 19:43
Commands to install and configure ElasticSearch on Ubuntu

Install ElasticSearch and Java

1  wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
2  sudo dpkg -i elasticsearch-1.0.1.deb
3  sudo update-rc.d elasticsearch defaults 95 10
4  sudo add-apt-repository ppa:webupd8team/java
5  sudo apt-get update
6  sudo apt-get install oracle-java7-installer
7  java -version
@welsh
welsh / README.md
Last active November 2, 2020 18:05
Server Status Squares: A Dashing Dashboard Widget to represent a Server Status as a Colored Square.

Server Status Squares

A Dashing widget that checks whether a server is responding to either an http or ping request using smaller squares to represent its status.

This is based off of the Server Status widget that willjohnson developed but modified to work across multiple squares rather than be one square with a list.

Description

The widget updates the appropriate squares color upon determining its status. Statuses are as follows:

@asafary
asafary / Person.java
Last active April 30, 2024 11:36
Example of how to read a Pojo from a CSV file using Jackson JSON Processor
package org.asafary.csv;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({ "name", "surname", "shoesize", "gender" })
public class Person {
public String name;
public String surname;
public int shoesize;