Skip to content

Instantly share code, notes, and snippets.

@benoptimus
benoptimus / tuto-usb-bootable-osx
Created December 3, 2014 09:57
Clé bootable installation mac osx
Maintenant si vous souhaitez créer une version Bootable de cette version, quelques étapes ultra-fastoches :
1 - Afficher les fichiers cachés dans le Finder (lancez le Terminal dans les utilitaires, puis copier-collez cette phrase) :
- Si vous êtes sous Mac OS X 10.8 ou inférieurs cette commande : defaults write com.apple.Finder AppleShowAllFiles TRUE et Entrée
- Si vous êtes déjà sous Mac OS X 10.9, cette commande : defaults write com.apple.finder AppleShowAllFiles TRUE et Entrée
puis
killall Finder et Entrée
2 - Faites un clic-droit sur votre icône de Installer OS X Mavericks > Afficher les contenus du paquet > Ouvrez le dossier Contents > puis SharedSupport > Double cliquez sur InstallESD.dmg pour qu'il s'ouvre et s'affiche sur le bureau
3 - Ouvrez le OS X Install ESD qui est sur votre bureau et grâce à l'affichage des fichiers invisibles (étape 1), vous pouvez voir l'image disque BaseSystem.dmg

Developer Cheat Sheets

This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everday and this Gist is the first bookmark on my list for quick and easy access.

I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.

from django.template import Library
from django.template.defaultfilters import lower
register = Library()
@register.filter
def gt(value, arg):
"Returns a boolean of whether the value is greater than the argument"
return value > int(arg)
@benoptimus
benoptimus / strophe.xdomainrequest.js
Created February 21, 2016 17:27 — forked from kenstir/strophe.xdomainrequest.js
A Strophe plugin by iAdvize that use the XdomainRequest if found (Internet Explorer)
Strophe.addConnectionPlugin("xdomainrequest", {
init: function () {
if (window.XDomainRequest) {
Strophe.debug("using XdomainRequest for IE");
// override the send method to fire readystate 2
if (typeof XDomainRequest.prototype.oldsend == 'undefined') {
XDomainRequest.prototype.oldsend = XDomainRequest.prototype.send;
XDomainRequest.prototype.send = function() {
XDomainRequest.prototype.oldsend.apply(this, arguments);