Skip to content

Instantly share code, notes, and snippets.

View molokoloco's full-sized avatar
💭
I'm available! Hire me!

Julien Guézennec molokoloco

💭
I'm available! Hire me!
View GitHub Profile
@ashwebstudio
ashwebstudio / custom-featured-image-size.php
Last active August 22, 2023 10:23
WordPress: Make unique custom image size ONLY for featured image of a post
@revolunet
revolunet / console.log.sublime-snippet
Created November 16, 2016 22:33
sublime console.log snippet
<!-- save to ~/Library/Application Support/Sublime Text 3/Packages/User -->
<snippet>
<content><![CDATA[console.log({ $1 })]]></content>
<tabTrigger>con</tabTrigger>
<description>console.log</description>
</snippet>
@tzkmx
tzkmx / jquery-redux-example.js
Created August 11, 2016 23:40
Redux with jQuery simple example
// original from:https://codepen.io/mdd/pen/wGRqbw
// Reducer
const counter = (state = 0, actions) => {
switch (actions.type) {
case 'INCREMENT': return state + 1;
case 'DECREMENT': return state - 1;
default: return state
}
}
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@steren
steren / SSE DEMO.md
Last active December 16, 2015 14:49

Simple example of Server Send Events By Steren Giannini for Paris JS

@rachelbaker
rachelbaker / matchMedia.js
Created August 24, 2012 17:38
jQuery matchMedia event handler for mobile
jQuery(document).ready(function($) {
// load touchdown resposnive nav
$('#site-navigation .menu').Touchdown();
// check window size
if (matchMedia) {
var mq = window.matchMedia("(min-width: 769px)");
mq.addListener(WidthChange);
WidthChange(mq);
}
@pamelafox
pamelafox / grunt.js
Created May 7, 2012 20:31
Grunt for a CSS/JS WebApp
/*global module:false*/
module.exports = function(grunt) {
var CSS_DIR = 'src/css/';
var JS_DIR = 'src/js/';
var BUILD_DIR = '../build/';
// Project configuration.
grunt.initConfig({
@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@joelambert
joelambert / README
Created June 1, 2011 11:03
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@felixge
felixge / image_resize.js
Created May 20, 2011 18:07
On demand image resizing with node.js in
// Usage: http://localhost:8080/image.jpg/100x50
var http = require('http');
var spawn = require('child_process').spawn;
http.createServer(function(req, res) {
var params = req.url.split('/');
var convert = spawn('convert', [params[1], '-resize', params[2], '-']);
res.writeHead(200, {'Content-Type': 'image/jpeg'});
convert.stdout.pipe(res);