Skip to content

Instantly share code, notes, and snippets.

View boye's full-sized avatar
🏠
Working from home

Boye boye

🏠
Working from home
View GitHub Profile
@boye
boye / animate.less
Created February 28, 2013 07:27
Use the HTML classes in animate.css as LESS mixins.
/*
Animate.css - http://daneden.me/animate
LICENSED UNDER THE MIT LICENSE (MIT)
Copyright (c) 2012 Dan Eden
*/
.animated {
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
@boye
boye / vwe_helpers.js
Created May 28, 2013 14:39
Small module with a couple helper methods related to VWE functionality. Based on http://blog.kenteken.tv/2011/05/06/code-snippets-formatteren-rdw-kenteken/
/**
* Small module with a couple helper methods related to VWE functionality
* Based on http://blog.kenteken.tv/2011/05/06/code-snippets-formatteren-rdw-kenteken/
*
* @author Boye Oomens <boye@e-sites.nl>
* @type {Object}
*/
var vwe = {
/**
@boye
boye / create_mamp_vhost.sh
Created September 5, 2013 14:04
Small Bash script to create a MAMP vhost
#!/bin/bash
RED="\033[0;31m"
YELLOW="\033[33m"
REDBG="\033[0;41m"
WHITE="\033[1;37m"
NC="\033[0m"
if [ "$1" = "create" ] || [ "$1" = "add" ]; then
# Ask for document root
@boye
boye / perfscroll.html
Created February 14, 2014 15:48
Small plugin to implement a performant scroll listener (based on an idea by John Resig)
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<meta charset="utf-8">
<title>Perfscroll jQuery plugin</title>
</head>
<body>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
@boye
boye / disablesubmit.js
Last active August 29, 2015 13:56
Simple snippet to disable submit buttons when submitting a form to prevent multiple submits. This is especially useful when the user is on a slow connection.
(function (d) {
var f = d.getElementsByTagName('form'),
i = f.length;
while (i--) {
f[i].addEventListener('submit', function () {
this.querySelector('[type="submit"]').disabled = 1;
}, false);
}
}(document));
@boye
boye / svn-cheatsheet.sh
Created April 30, 2014 14:43
SVN Cheatsheet
Creating a new repository:
mkdir /path/to/new/dir
svnadmin create /path/to/new/dir
Starting svnserve:
svnserve --daemon --root /path/to/new/repository
Importing project into svn repo:
$ svn import -m "Wibble initial import" svn://olio/wibble/trunk
Creating directory in svn repo:
$ svn mkdir -m "Create tags directory" svn://olio/wibble/tags
Branching:
@boye
boye / index.html
Created August 2, 2014 11:18
Custom statechange event that will be triggered after manually calling history.pushState
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Custom statechange event</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="padding:1em;">
<h1>Custom <code>statechange</code> event</h1>
<p>
@boye
boye / Esites_Editor.xml
Last active August 29, 2015 14:22
Magento Advanced HTML Editor snippets
<?xml version="1.0"?>
<config>
<modules>
<Esites_Editor>
<active>true</active>
<codePool>community</codePool>
</Esites_Editor>
</modules>
</config>
@boye
boye / sublime-settings.json
Created August 7, 2015 13:28
My personal Sublime settings
{
"always_show_minimap_viewport": true,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": ".",
@boye
boye / beinformed.sh
Created May 1, 2019 12:51
Simple bash script that makes the maintenance of Be Informed projects easier
#!/bin/sh
if [ ! $# == 1 ] ; then
echo "Usage: $0 mts (project/branch)"
exit 1
fi
# Root base dir
BASEDIR="/Users/username/Development/beinformed"