Skip to content

Instantly share code, notes, and snippets.

View AlexKomm's full-sized avatar

Aleksandr Komm AlexKomm

  • Miro
  • Amsterdam, Netherlands
View GitHub Profile
@AlexKomm
AlexKomm / update-from-remote.sh
Created September 4, 2018 06:09 — forked from tassilogroeper/update-from-remote.sh
Drupal update script to update configuration
#!/usr/bin/env bash
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
CURRENT_FOLDER="$(basename $(pwd))"
TARGET_FOLDER="web"
LOCAL_ALIAS="local"
DRUSH_ALIAS_GROUP="your-website-name"
DRUSH_PATH="../vendor/bin/drush"
SERVER_ABSOLUTE_PATH="/app/web/"
UPLOAD_FILES_DIRECTORY="sites/default/files/uploads"
# Copyright: Benjamin Weiss (keyboardsurfer) https://github.com/keyboardsurfer
# Under CC-BY-SA V3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)
# built application files
*.apk
*.ap_
*.jar
!gradle/wrapper/gradle-wrapper.jar
# lint folder
name = User register alter example
description = Demonstrates how to alter the registration form with an AHAH element.
core = 6.x
// Create a private scope.
(function( $, on ){
// I proxy the given function and return the resultant GUID
// value that jQuery has attached to the function.
var createAndReturnProxyID = function( target ){
// When generating the proxy, it doesn't matter what the
// "context" is (window in this case); we never actually
#!/bin/bash
COMPASS="/var/lib/gems/1.8/bin/compass"
case "$1" in
""|start)
echo "Starting compass watch..."
if [ -f ./cwatch.pid ]
then
echo "Sorry, but compass is already watching this folder..."
@AlexKomm
AlexKomm / social.js
Created February 21, 2013 04:43 — forked from meritt/social.js
(function(window, document) {
window.___gcfg = { // Настройки языка для Google +1 Button
lang: 'ru'
};
window._gaq = [ // Настройки Google Analytics
['_setAccount', 'UA-XXXXXX-1'],
['_trackPageview'],
['_trackPageLoadTime']
];
/**
* $.parseParams - parse query string paramaters into an object.
*/
(function($) {
var re = /([^&=]+)=?([^&]*)/g;
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );};
$.parseParams = function(query) {
var params = {}, e;
while ( e = re.exec(query) ) {
@AlexKomm
AlexKomm / screening.js
Created September 25, 2012 05:30 — forked from rmurphey/screening.js
JS Knowledge Test
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
@AlexKomm
AlexKomm / jquery.ba-tinypubsub.js
Created June 22, 2012 07:33 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@AlexKomm
AlexKomm / An_example.markdown
Created June 22, 2012 05:23 — forked from olivierlacan/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.