Skip to content

Instantly share code, notes, and snippets.

View johanbove's full-sized avatar
💭
Semper meliorem facio

Johan Bové johanbove

💭
Semper meliorem facio
View GitHub Profile
@robatron
robatron / javascript-log-wrapping.md
Last active February 6, 2024 06:49
Wrapping `console.log` (et al.) in your own function to modify logging behavior.

JavaScript Log Wrapping

Wrapping console.log (et al.) in your own function to modify logging behavior.

Why?

You may want a simple way to:

@ebidel
ebidel / Web Components Resources.md
Last active February 27, 2023 22:04
List of resources related to Web Components
@lelandrichardson
lelandrichardson / ko-convenience.js
Created March 5, 2014 01:11
Knockout.js Custom Utility Bindings
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
href: {
update: function (element, valueAccessor) {
handlers.attr.update(element, function () {
return { href: valueAccessor() };
});
}
},
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@rodneyrehm
rodneyrehm / feedback.md
Last active August 29, 2015 14:01
WPDS Düsseldorf 2014 - JavaScript Group // http://wpd.mx/dusjs

#Talks

##Jeremy Keith

  • The idea of the internet is to make everyone a publisher
  • In contrast to Apps there is no gatekeeper
  • Grunt an SASS and so on are great but raise the entry bar for content creation
  • Geocities: Founded 1994. 3rd most visited on the web. Never the prettiest, but also a playground for everyone, for normal people.
  • 1999 Yahoo acquired Geocities, in 2009 it was shut down and 15 years of content were just wiped out
  • The content might be mostly ugly, but it is also a fragment of history
@rodneyrehm
rodneyrehm / log-requests.php
Last active August 29, 2015 14:11
IE11 Bug: Favicon Request
<?php
$logfile = '/tmp/ie-11-favicon.log';
if (empty($_GET['type'])) {
$_GET['type'] = 'html';
}
$headers = array(
'Request ' . $_GET['type'] . ' at ' . date('Y-m-d H:i:s'),
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@wbsch
wbsch / on-modify.blocks_attr.py
Last active May 20, 2024 20:46
Taskwarrior hook script that adds a "blocks:" pseudo-attribute for adding/modifying tasks.
#!/usr/bin/env python
#
# Adds the ability to add / modify tasks using a "blocks:" attribute,
# the opposite of "depends:".
#
# This script acts as an on-modify, on-add and on-launch hook at the same time.
#
### SETUP
# Save this file as
# ~/.task/hooks/on-modify.blocks_attr.py
@DarrenN
DarrenN / get-npm-package-version
Last active April 17, 2024 16:57 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION