Skip to content

Instantly share code, notes, and snippets.

Not coding

Jesus Leon JesusLeon

Not coding
Block or report user

Report or block JesusLeon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View php.php
$article_supplier = Shopware()->Db()->fetchAll("SELECT article, supplier FROM s_articles a, s_articles_vote av, s_articles_supplier s WHERE = av.articleID AND = a.supplierID GROUP BY (av.articleID)");
foreach ($article_supplier as $a_s) {
$sql = "UPDATE `s_articles_vote`
`supplierName` = '" . $a_s['supplier'] . "'
`voteID` = '" . $a_s['article'] . "'
JesusLeon /
Last active Jul 23, 2018 — forked from bartoszmajsak/
How to automatically prepend git commit with a branch name
# 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)
BRANCH_NAME=$(git symbolic-ref --short HEAD)
View redmine_better_comments.js
// ==UserScript==
// @name Redmine better comments
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://**
// @grant none
// ==/UserScript==
JesusLeon / OrderMod_Bootstrap.php
Created Jan 13, 2017 — 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
View OrderMod_Bootstrap.php
class Shopware_Plugins_Frontend_OrderMod_Bootstrap extends Shopware_Components_Plugin_Bootstrap
* (non-PHPdoc)
* @see Shopware_Components_Plugin_Bootstrap::install()
public function install()
View git fire
git config --global '!git checkout -b fire && git add -A && git commit -m "fire!" && git push origin fire'
# or friday or 6 o'clock :)
git config --global alias.friday '!git checkout -b friday && git add -A && git commit -m "friday!" && git push origin friday'
git config --global alias.6oclock '!git checkout -b 6oclock && git add -A && git commit -m "6oclock!" && git push origin 6oclock'
JesusLeon /
Last active Oct 8, 2015
Development Notes

NOTE: I'm now writing my dev-notes on my Log at

Development Notes

A collection of development related notes and ideas. Spontaneously thought along the daily work. Seemed rational when they were conceived.

Warning: Some ambiguity may occur. And excecution details may be needed :)

JesusLeon / pubsub.js
Last active Aug 29, 2015 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
View pubsub.js
// Event - a super-basic Javascript (publish subscribe) pattern
var Event = {
event: {},
listen: function (eventName, fn) {
this.event[eventName] = this.event[eventName] || [];
JesusLeon /
Created Jul 30, 2015
Php Code Style Fixers
php-cs-fixer fix --fixers=multiline_array_trailing_comma,operators_spaces,return,unused_use,concat_with_spaces,short_array_syntax,whitespacy_lines .
JesusLeon / JS_Parser.js
Last active Aug 29, 2015
A small JS {string} parser
View JS_Parser.js
function parse(template, data) {
var replacer = function (context) {
return function (placeholder, name) {
return context[name];
return template.replace(/\{(\w+)\}/g, replacer(data));
JesusLeon / list_open_apps.applescript
Created Jul 27, 2015
List open apps applescript
View list_open_apps.applescript
tell application "System Events"
-- get properties of every process where background only is false
set listOfProcesses to (title of every process where background only is false)
tell me to set selectedProcesses to choose from list listOfProcesses with multiple selections allowed
end tell
You can’t perform that action at this time.