Skip to content

Instantly share code, notes, and snippets.

@JesusLeon
JesusLeon / prepare-commit-msg.sh
Last active July 23, 2018 08:52 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
# BRANCH_NAME="${BRANCH_NAME##*/}"
@JesusLeon
JesusLeon / OrderMod_Bootstrap.php
Created January 13, 2017 09:02 — forked from sthamann/OrderMod_Bootstrap.php
Advanced Example how to create 2 custom fields, fill them in order process, display them in backend order list as new columns and make them editable in order detail view
<?php
class Shopware_Plugins_Frontend_OrderMod_Bootstrap extends Shopware_Components_Plugin_Bootstrap
{
/**
* (non-PHPdoc)
* @see Shopware_Components_Plugin_Bootstrap::install()
*/
public function install()
{
@JesusLeon
JesusLeon / pubsub.js
Last active August 29, 2015 14:27 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
// Event - a super-basic Javascript (publish subscribe) pattern
var Event = {
event: {},
listen: function (eventName, fn) {
this.event[eventName] = this.event[eventName] || [];
this.event[eventName].push(fn);
},