Skip to content

Instantly share code, notes, and snippets.

View davidroyer's full-sized avatar

David Royer davidroyer

View GitHub Profile
@davidroyer
davidroyer / Display commit timestamp at github as javascript bookmark This simple js bookmark let you display the correct commit timestamp at github
javascript:(function() {
var relativeTimeElements = window.document.querySelectorAll("relative-time");
relativeTimeElements.forEach(function(timeElement){
timeElement.innerHTML = timeElement.innerHTML +" -- "+ timeElement.title;
})
}())
@davidroyer
davidroyer / gist:cf90de4890c23183115ec738d8b78fd7
Created June 16, 2018 04:39 — forked from davidhemphill/gist:5188894
How to do a Git clone without the .git directory
// Clone the repo
git clone --depth=1 git://someserver/somerepo dirformynewrepo
// Remove the .git directory
rm -rf !$/.git
@davidroyer
davidroyer / remove-node_modules
Created June 12, 2018 20:48 — forked from cassidoo/remove-node_modules
Remove node_modules from git
Add to .gitignore file
node_modules
Then call:
git rm -r --cached node_modules
git commit -m "Remove node_modules now that they're ignored!"
git push origin master
@davidroyer
davidroyer / restapi.txt
Created May 13, 2016 22:12 — forked from chrismccoy/restapi.txt
WordPress REST API Resources
WP REST API: Internals and Customization
http://code.tutsplus.com/tutorials/wp-rest-api-internals-and-customization--cms-24945
Submit WordPress Posts from the Front-End with the WP-API
https://apppresser.com/wp-api-post-submission/
Demo plugin using wp.Backbone.View and the WP JSON REST API v2
https://github.com/brianhogg/wp-backbone-view-rest-api-demo
A Swift iOS application that demonstrates using WordPress API
@davidroyer
davidroyer / Recommanded_mac_apps.md
Created March 8, 2016 18:57 — forked from TreyCai/Recommanded_mac_apps.md
Recommanded Mac OS X Apps
TODO: Add price informations
TODO: Add App Store Addresses

System Tools


###Chrome

One browser for your computer, phone and tablet

@davidroyer
davidroyer / Gulpfile.js
Created March 3, 2016 19:21 — forked from DESIGNfromWITHIN/Gulpfile.js
Gulpfile.js example Uses browser-sync, node-neat, gulp and gulp-sass
/*
Gulpfile.js file for the tutorial:
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev
Steps:
1. Install gulp globally:
npm install --global gulp
@davidroyer
davidroyer / shortcodes.php
Created February 3, 2016 20:37 — forked from gyrus/shortcodes.php
TinyMCE button for WordPress shortcode
<?php
/**
* Skeletal sample shortcode
*/
add_shortcode( 'pilau-sample', 'pilau_sample_shortcode' );
function pilau_sample_shortcode( $atts ) {
extract( shortcode_atts( array(
'text' => ''
), $atts ) );
@davidroyer
davidroyer / 0_reuse_code.js
Created October 19, 2015 21:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console