Skip to content

Instantly share code, notes, and snippets.

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / pre-commit
Created Mar 26, 2017
Shellcheck pre-commit hook
View pre-commit
#!/bin/sh
#
# This pre-commit hook run `shellcheck` against your code when you go to commit.
# See: http://www.shellcheck.net/
#
# To use this script copy it to .git/hooks/pre-commit and make it executable.
# Work out what to diff against, really HEAD will work for any established repository.
if git rev-parse --verify HEAD >/dev/null 2>&1
then
@dharFr
dharFr / README.md
Last active Mar 26, 2017
Open JIRA from the terminal
View README.md

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]
@dharFr
dharFr / keybase.md
Last active Aug 29, 2015
keybase.md
View 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 / HowToSetupASimpleHttpsServer.md
Last active Jan 4, 2016
Quikly setup a local HTTPS server for dev/test purpose
View HowToSetupASimpleHttpsServer.md

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 / keyboard-events-on-tv.md
Created Oct 29, 2013
Testing keyboard (aka remote) events received in a few TV browsers.
View keyboard-events-on-tv.md

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 / local-git-share.md
Last active Dec 20, 2015
Quickly share your local GIT repo
View local-git-share.md

On your side :

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

On your co-worker side :

View jsbin.ehasok.html
<!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 / README.md
Last active Dec 11, 2015
Web is more beautiful in Full Screen : A simple bookmarklet to toogle fullScreenMode in modern browsers.
View README.md

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
@dharFr
dharFr / Sample output
Created Aug 23, 2012
grailsenv - Dynamically switch your GRAILS_HOME
View Sample output
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
You can’t perform that action at this time.