Skip to content

Instantly share code, notes, and snippets.

View 0gust1's full-sized avatar
🔥

Augustin C. 0gust1

🔥
  • France
View GitHub Profile
@0gust1
0gust1 / gist:8ef61eaea5797051841e
Last active May 19, 2019 17:16
CSS in JS with React
@0gust1
0gust1 / form-validation.js
Created July 9, 2014 10:34
webshims iVal errorBoxes modifications
webshims.register('form-validation', function($, webshims, window, document, undefined, options){
"use strict";
var isWebkit = 'webkitURL' in window;
var hasNative = Modernizr.formvalidation && !webshims.bugs.bustedValidity;
var chromeBugs = isWebkit && hasNative;
var ua = navigator.userAgent;
var webkitVersion = chromeBugs && parseFloat((ua.match(/Safari\/([\d\.]+)/) || ['', '999999'])[1], 10);
var iVal = options.iVal;
@0gust1
0gust1 / build.js
Last active November 5, 2016 22:18
metalsmith static website build, with livreload
var extname = require('path').extname;
var Metalsmith = require('metalsmith');
var myth = require('myth');
var http = require('http');
var templates = require('metalsmith-templates');
var markdown = require('metalsmith-markdown');
var watch = require('metalsmith-watch');
/**
#!/usr/bin/env node
//module.exports = function(){
var http = require("http");
var optimist = require("optimist");
var cheerio = require("cheerio");
var path = require("path");
var uglifyjs = require('uglifyjs');
var uglifycss = require('uglifycss');
var url = require('url');
@0gust1
0gust1 / default_config.js
Last active November 17, 2016 15:58
Usable and flexible Gruntfile modularization ?
module.exports = function(grunt, env) {
var defaults = config = {
//Write here your configuration , grunt style, in the standard way
//Extract informations from package.json
pkg: grunt.file.readJSON('package.json'),
//Define a global banner
@0gust1
0gust1 / gruntfile_modularization.md
Last active April 25, 2016 12:50
Inventory of solutions to modularize grunt configuration for large project & (legacy) codebases

Grunt config modularization

Inventory of solutions to modularize grunt configuration for large project & (legacy) codebases

Existing solutions

Grunt-modules

@0gust1
0gust1 / gist:7354449
Last active December 27, 2015 16:19
Wishlist (nowel ou autre)
@0gust1
0gust1 / gist:5857958
Created June 25, 2013 12:03
My .zshrc (used with cygwin and console2) : http://www.typeof.co/post/a-better-terminal-for-windows
# The following lines were added by compinstall
zstyle :compinstall filename '/home/10071495/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# prompt extensions
autoload -U promptinit && promptinit
@0gust1
0gust1 / eventsShow
Last active December 18, 2015 21:59
JS function displaying all JS event binded to DOM elements corresponding to passed jQuery selector.
function eventsShow(selecteur, eventType) {
var jElements = jQuery(selecteur);
console.groupCollapsed("Gestionnaires d'évènements pour les éléments correspondant à jQuery(\"%s\");",selecteur);
//on boucle sur les éléments
for (var j = 0; j < jElements.length; j++) {
var element = jElements.get(j);
@0gust1
0gust1 / IERenderingModes.js
Created April 25, 2012 13:55
Javascript bookmarklet displaying all important Internet Explorer rendering informations
javascript:(function(){
var txtAlert='';
txtAlert+='Browser : '+window.navigator.appName+' '+window.navigator.appVersion+'\nUser-Agent : '+window.navigator.userAgent+'\nDocumentMode : '+document.documentMode+'\nCompatMode : '+document.compatMode;
//console.log(txtAlert);
alert(txtAlert);
})()