Skip to content

Instantly share code, notes, and snippets.

@devlint
devlint / Log-.md
Created December 3, 2013 08:52 — forked from bgrins/Log-.md

Javascript log Function

Every time I start a new project, I want to pull in a log function that allows the same functionality as the console.log, including the full functionality of the Console API.

There are a lot of ways to do this, but many are lacking. A common problem with wrapper functions is that the line number that shows up next to the log is the line number of the log function itself, not where log was invoked. There are also times where the arguments get logged in a way that isn't quite the same as the native function.

This is an attempt to once and for all document the function that I pull in to new projects. There are two different options:

  • The full version: Inspired by the plugin in HTML5 Boilerplate. Use this if you are writing an application and want to create a window.log function. Additionally,
@devlint
devlint / alias.gitconfig
Last active June 5, 2018 08:40
Voici la liste de mes alias GIT
[alias]
#lister tous mes alias
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/'
#commandes de base
st = status
ci = commit
cl = clone
co = checkout
cm = commit -m
@devlint
devlint / oneTeaMobile.bower.json
Created May 14, 2013 14:18
Liste des dépendances bower
{
"name": "oneTea-Mobile",
"version": "1.0.0",
"dependencies": {
"c2is-less": "http://github.com/c2is/c2is-less-component.git",
"jquery": "2.0.0",
"modernizr": "https://raw.github.com/josh/sprockets-modernizr/2.6.2/modernizr.js",
"ratchet": "ratchet"
}
}
@devlint
devlint / offcanvas.html
Created March 13, 2013 10:54
Off-Canvas - Just a simple and minimal 'off-canvas' template with css3 translate3d & jQuery. Needs: - Font Awesome for icons - jQuery & normalize.css components
<!DOCTYPE html>
<!--[if lt IE 10]> <html class="lt-ie10"> <![endif]-->
<!--[if gt IE 10]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>OFF-CANVAS</title>