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"
@AlexKomm
AlexKomm / advancedsettings.xml
Created January 24, 2017 09:44
Kodi Buffering fix
<?xml version="1.0" encoding="utf-8"?>
<advancedsettings>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>0</cachemembuffersize>
<readbufferfactor>4.0</readbufferfactor>
</network>
<videolibrary></videolibrary>
</advancedsettings>
@AlexKomm
AlexKomm / gist:3382730ec3b4ffd92cc10d0f51850dba
Created January 24, 2017 09:38
OSMC CouchPotato install
CouchPotato
_
1. SSH into your working instance of OSMC on your Raspberry Pi or Raspberry Pi 2.
For example: ssh osmc@192.168.xxx.xxx
User: osmc
Pass: osmc
_
2. Create a user, mod his groups, and make empty home folder for ~/.couchpotato configs
@AlexKomm
AlexKomm / material_colors.xml
Created April 6, 2016 10:11
Material design colors
<resources>
<!-- RED -->
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
<color name="red_600">#dd191d</color>
<color name="red_700">#d01716</color>
# 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) ) {