Skip to content

Instantly share code, notes, and snippets.

View dharFr's full-sized avatar

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / jquery.pluginName.coffee
Created July 23, 2011 14:28
jQuery Plugin pattern written in CoffeeScript (written from jQuery Doc: http://docs.jquery.com/Plugins/Authoring)
###*
* jQuery pluginName plugin v0.1
* ==========================
* see http://docs.jquery.com/Plugins/Authoring
*
* plugin description goes here
* author your.name@email.com
###
(($) ->
@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 / 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]
@dharFr
dharFr / jquery.observer.js
Created February 28, 2012 00:39
jQuery based observer pattern
;(function($) {
/*
* jQuery Observer pattern
* inspired by @addyosmani 's code
* see: http://addyosmani.com/resources/essentialjsdesignpatterns/book/#highlighter_506612
*/
var topics = [];
function getTopic(id) {
var callbacks;
topic = id && topics[id];
@dharFr
dharFr / pre-commit
Created March 26, 2017 23:24
Shellcheck pre-commit hook
#!/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