Skip to content

Instantly share code, notes, and snippets.

Alex Weber alexweber

Block or report user

Report or block alexweber

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
@alexweber
alexweber / create-plugin.js
Last active Aug 14, 2018
create plugin script
View create-plugin.js
'use strict';
const requestify = require('requestify');
const homedir = require('os').homedir();
const cfg = require(homedir + '/.maya/mayarc.json');
// Load default dev token and namespace prefix from glboal user config.
const token = cfg.token;
const prefix = cfg.prefix;
@alexweber
alexweber / CONVENTIONS.md
Created Jun 5, 2018
Git Commit Conventions
View CONVENTIONS.md

Git Commit Conventions

Commit Conventions

<type>(scope): message

Types

  • feat (features)
  • fix (bug fixes)
@alexweber
alexweber / buster.py
Last active Oct 28, 2017
hacked buster.py for my personal site
View buster.py
"""Ghost Buster. Static site generator for Ghost.
Usage:
buster.py setup [--gh-repo=<repo-url>] [--dir=<path>]
buster.py generate [--domain=<local-address>] [--dir=<path>] [--github-id=<github-id>]
buster.py preview [--dir=<path>]
buster.py deploy [--dir=<path>]
buster.py add-domain <domain-name> [--dir=<path>]
buster.py (-h | --help)
buster.py --version
View ionic2-async.js
handler: () => {
return this.data.load().then(() => {
return alert.dismiss();
}).then(() => {
this.nav.pop();
});
return false;
}
View rc_patch_groupings_pass_by_ref.patch
From e954bc23404f8eb5db37ae8acbed8ca7a16f358b Mon Sep 17 00:00:00 2001
From: Alex Weber <alexweber15@gmail.com>
Date: Wed, 27 Apr 2016 15:06:41 -0300
Subject: [PATCH] fix call-time pass by reference error
---
.../modules/vrweb/vrfusion_grouping/views/views_plugin_pager_groups.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sites/all/modules/vrweb/vrfusion_grouping/views/views_plugin_pager_groups.inc b/sites/all/modules/vrweb/vrfusion_grouping/views/views_plugin_pager_groups.inc
@alexweber
alexweber / hoisting.js
Last active Apr 15, 2016
Hoisting examples
View hoisting.js
// Example 1
var foo = 1;
function bar() {
if (!foo) {
var foo = 10;
}
alert(foo);
}
bar();
@alexweber
alexweber / .gitconfig
Created Dec 12, 2014
Minimalistic sensible defaults .gitconfig
View .gitconfig
[core]
filemode = false
[alias]
co = checkout
st = status
ci = commit
l = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
[color]
ui = auto
@alexweber
alexweber / settings.php
Created Mar 7, 2014
settings.php alta performance (apc + memcache + authcache)
View settings.php
<?php
# APC.
$conf['cache_backends'][] = 'sites/all/modules/contrib/apc/drupal_apc_cache.inc';
// $conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';
# Memcache.
$conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc';
$conf['lock_inc'] = 'sites/all/modules/contrib/memcache/memcache-lock.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
@alexweber
alexweber / raptorize-css3.js
Created Feb 23, 2013
Modernizr-enhenced jQuery Raptorize plugin using CSS3 transitions and transforms with animate() fallback. (Only includes the changed parts)
View raptorize-css3.js
// This obviously requires a Modernizr build with support for csstransforms, csstransitions and audio.
// All vendor prefixes included for clarity.
// First some better checking for HTML5 Audio
if (Modernizr.audio.mp3) {
audioSupported = true;
raptorAudioMarkup = '<audio id="elRaptorShriek" preload="auto"><source src="' + prefix + 'raptor-sound.mp3" /></audio>';
}
else if (Modernizr.audio.ogg) {
audioSupported = true;
You can’t perform that action at this time.