Skip to content

Instantly share code, notes, and snippets.

Jordan Becker habovh

Block or report user

Report or block habovh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@habovh
habovh / di-game rules
Last active Apr 1, 2016
Les règles officielles du di-game
View di-game rules
# Di-game
> Informations et règles officielles du jeu
## Disclaimer
Le jeu n'a pas été inventé par les auteurs de ces règles, nous n'en réclamons pas la paternité, mais essayons de faire dans l'originalité ainsi que la rigueur, afin de proposer une experience de jeu (de vie ?) unique et excitante !
## Histoire
Prenez 2 bros, mettez-les ensemble dans les mêmes cours, patientez, profitez.
L'idée est venue comme ça, probablement un jour d'ennui profond, allez savoir... Mais on a commencé à jouer à ce jeu très simple en toute innocence. Au fur et à mesure du temps, on a commencé à compter les points, et à jouer de jour en jour, de plus en plus sérieusement. C'est à ce moment là qu'on s'est dit qu'il nous faudrait établir des règles précises pour couvrir tous les cas de conflits ou de doute. Car oui évidemment, il n'y a pas d'arbitre à ce jeu, il faut compter sur l'honnêteté de son adversaire. (On fait dans le social quoi!)
@habovh
habovh / angular.filters.nl2br.coffee
Last active Jul 22, 2016 — forked from kensnyder/angular.filters.nl2br.js
Safe NL2BR filter for Angular, compatible with linky. Transforms newlines ( \n) into HTML <br /> tags.
View angular.filters.nl2br.coffee
# nl2br linky-compatible Angular filter
# CoffeeScript Version (available in JS)
#
# Sample usage in html template:
# "xxx | nl2br"
# <div ng-bind-html=" YourString | nl2br "></div>
angular.module('nl2brFilter', []).filter('nl2br', ['$sanitize', ($sanitize) ->
tag = '<br />'
@habovh
habovh / Wunderground icon names
Created Jan 13, 2016
Wunderground icon names returned by the API, in case you handle your own icons that do not have the same name for example.
View Wunderground icon names
chanceflurries
chancerain
chancesleet
chancesleet
chancesnow
chancetstorms
chancetstorms
clear
cloudy
flurries
@habovh
habovh / trash.sh
Last active Apr 3, 2016
Little trash script for use with OS X. Mimics Finder's behavior when deleting a file that has the same name as a file already present in the trash, with a bonus.
View trash.sh
#!/bin/bash
for file in "$@"; do
filename=$(basename "$file")
extension="${filename##*.}"
filename="${filename%.*}"
dest="$HOME/.Trash/$filename.$extension"
if [ -f "$dest" ]; then
@habovh
habovh / crashdialog
Last active Jul 18, 2018
Simple bash script to quickly enable/disable macOS crash reporting dialogs. Tested on macOS Sierra.
View crashdialog
#!/bin/bash
# Author: Jordan Becker (https://becker.io/)
if [ $# -lt 1 ]; then
echo "Usage: $0 (on|off|read)"
echo "Lets you quickly enable or disable macOS crash reporting dialogs. Useful for betas ;)"
exit 1
fi
case "$1" in
View keybase.md

Keybase proof

I hereby claim:

  • I am habovh on github.
  • I am jordanbecker (https://keybase.io/jordanbecker) on keybase.
  • I have a public key ASDaEsC_mrqBbV97x8jqgA91zPfuFas1ybz1Bt3MZo0Q8Qo

To claim this, I am signing this object:

@habovh
habovh / cors_support.conf
Last active Apr 18, 2019 — forked from agouriou/nginx.conf
Example Nginx (> 1.9) configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs. Handle error status (4xx, 5xx) and expose headers.
View cors_support.conf
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support.conf"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support.conf;
#
# A limitation to this method is that Nginx doesn't currently send headers
@habovh
habovh / zshrc_Apple_Terminal
Last active Sep 10, 2019
ZSH + Apple Terminal: set tab title current working directory for Mojave and earlier
View zshrc_Apple_Terminal
# This is a slightly modified version of Mojave (10.14) script located in /etc/bashrc_Apple_Terminal
# modified to work with zsh.
# It mainly calls update_terminal_cwd when changing the working directory, which prints a special
# invisible string that Apple Terminal interprets and updates the current term title accordingly.
# Note : this script is useless for macOS Catalina and newer versions of macOS, since it should
# already contain at least this functionality.
# Instructions
# Place this file in /etc/ (alongside bash_Apple_Terminal)
You can’t perform that action at this time.