Skip to content

Instantly share code, notes, and snippets.

View dharFr's full-sized avatar

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / spock-whenthen.sublime-snippet
Created July 5, 2012 15:19
Sublime Text 2 snippet for basic 'when/then' Grails Spock test
<snippet>
<content><![CDATA[
def "${1:name your test}"() {
setup:
// setup your test
def l = [1, 2, 3]
when:
// test something
def r = l.findAll {it > 2}
then:
@dharFr
dharFr / Sample output
Created August 23, 2012 16:05
grailsenv - Dynamically switch your GRAILS_HOME
oaudard@work:~/Projects/sample-grails-project$ grailsenv
GRAILS_HOME=/home/oaudard/dev-utils/grails
grails
grails-1.3.7
grails-1.3.8
grails-2.0.0
grails-2.0.1
grails-2.0.3
grails-2.0.4
grails-2.1.0
@dharFr
dharFr / README.md
Last active December 11, 2015 18:49
Web is more beautiful in Full Screen : A simple bookmarklet to toogle fullScreenMode in modern browsers.

Web is more beautiful in Full Screen

Toogle Fullscreen Bookmarklet

A simple bookmarklet to enable fullScreenMode in modern browsers.

Usage

  • Copy loader.js code into a bookmark's location field.
  • Press Ctrl+Enter to toogle fullscreen mode
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="A Simple Video Instant Preview Demo" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<video id="video" controls></video>
<form>
@dharFr
dharFr / local-git-share.md
Last active December 20, 2015 15:29
Quickly share your local GIT repo

On your side :

> cd ~/path/to/your/repo/
> git daemon --reuseaddr --verbose  --base-path=. --export-all ./.git

On your co-worker side :

@dharFr
dharFr / keyboard-events-on-tv.md
Created October 29, 2013 09:00
Testing keyboard (aka remote) events received in a few TV browsers.

Here is the results of a few tests I ran on various "TV browsers" environments.

I wanted to know how those TV environements behaves regarding keyboard events. Is there a reliable standard way of handling remote controllers that we can work with?

The simple JS script I used to test keyCode behavior is available here : jsbin.com/OqAhIcA/13

Tested devices :

@dharFr
dharFr / HowToSetupASimpleHttpsServer.md
Last active January 4, 2016 17:19
Quikly setup a local HTTPS server for dev/test purpose

1- Generate a self-signed SSL certificate using openssl

1.1- Generate a key file

> openssl genrsa -out key.pem 1024

1.2- Create a certificate request (CSR) with that key

@dharFr
dharFr / keybase.md
Last active August 29, 2015 14:22
keybase.md

Keybase proof

I hereby claim:

  • I am dharfr on github.
  • I am oad (https://keybase.io/oad) on keybase.
  • I have a public key whose fingerprint is 562F CA1A 515F D1B7 D0B8 2EA9 9967 66E6 24A9 4F77

To claim this, I am signing this object:

@dharFr
dharFr / README.md
Last active March 26, 2017 23:25
Open JIRA from the terminal

Setup

  • Copy/Paste the function defined in jira.sh in you .bash_profile or .bashrc
  • Export JIRA_ROOT variable in your environemnt (most likely in your .bash_profile/.bashrc as well) : export JIRA_ROOT='https://jira.yourdomain.com/'

Usage

jira [issue]