Skip to content

Instantly share code, notes, and snippets.

View Darklg's full-sized avatar
👀
¯\_(ツ)_/¯

Kévin Rocher / @Darklg Darklg

👀
¯\_(ツ)_/¯
View GitHub Profile
@Darklg
Darklg / gist:2035502
Created March 14, 2012 10:02
Viewport(s)
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=1020" />
@Darklg
Darklg / gist:3728199
Created September 15, 2012 14:28
Mac OS Configuration
# Screenshots
#############
# Disable Screenshot shadow
defaults write com.apple.screencapture disable-shadow -bool true
# Screenshot name
defaults write com.apple.screencapture name "capture"
# Files
@Darklg
Darklg / gist:5386786
Last active December 16, 2015 05:48
Installation Jekyll Mac OS X
# Install Command Line Tools from Xcode
# Install RVM
curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled
# http://stackoverflow.com/questions/15324590/rvm-install-ruby-1-9-3-missing-required-packages
rvm requirements
brew install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl sqlite
@Darklg
Darklg / new_gist_file
Created May 23, 2013 09:02
HTML tag with conditional comments
<!--[if lt IE 8 ]><html lang="fr-FR" class="no-js is_ie7 lt_ie8 lt_ie9 lt_ie10"><![endif]-->
<!--[if IE 8 ]><html lang="fr-FR" class="no-js is_ie8 lt_ie9 lt_ie10"><![endif]-->
<!--[if IE 9 ]><html lang="fr-FR" class="no-js is_ie9 lt_ie10"><![endif]-->
<!--[if gt IE 9]><html lang="fr-FR" class="no-js is_ie10"><![endif]-->
<!--[if !IE]><!--> <html lang="fr-FR" class="no-js"><!--<![endif]-->
@Darklg
Darklg / gist:6218696
Last active December 21, 2015 00:18
Pull all your git repositories in a single command
#!/bin/bash
function pullall {
# Go to folder
cd $1;
# Check if it's a git repository
if test -d ".git/"; then
# Display repository name
echo -e "\033[33m "$1" \033[0m";
# Check repository status
@Darklg
Darklg / todo.md
Last active December 30, 2015 06:19
Test todo
  • Dolor

  • Ipsum

  • Ipsum

  • Ipsum

  • Dolor

  • Facto

  • Facto

@Darklg
Darklg / gist:8195666
Last active January 1, 2016 20:09
Extract WordPress functions from reference http://codex.wordpress.org/Function_Reference
var archive = [];
jQuery('#bodyContent').find('table[cellspacing]').find('tt a').each(function() {
archive.push(jQuery(this).text().trim())
});
console.log(JSON.stringify(archive));
@Darklg
Darklg / Change Your Password.md
Last active August 29, 2015 14:00
Change Your Password links
@Darklg
Darklg / gist:049914a2330d2f7b8d2f
Last active October 23, 2015 14:07
Disable iTunes launch at every media key press
# Disable iTunes launch at every media key press
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
# Enable
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
@Darklg
Darklg / gist:8680b4f6befd5f440d22
Last active November 4, 2015 09:44
Text Expander - Translate FR to EN
#!/usr/bin/php
<?php
$fromLang = 'fr';
$toLang = 'en';
$text = <<<'CLIP'
%clipboard
CLIP;
function wd_remove_accents($str, $charset = 'utf-8') {