Skip to content

Instantly share code, notes, and snippets.

View kotnik's full-sized avatar

Nikola Kotur kotnik

View GitHub Profile
@kotnik
kotnik / static.php
Created March 16, 2012 09:08
PHP Fail
<?php
class LeClass {
private static $_thing = array(
'path' => BASE_PATH . '/tmp',
);
}
@kotnik
kotnik / gist:1986671
Created March 6, 2012 14:54 — forked from voxpelli/gist:1069596
OAuth Connector setup for OAuth Login provider
<?php
$provider = new stdClass;
$provider->disabled = FALSE; /* Edit this to true to make a default provider disabled initially */
$provider->name = 'sso1';
$provider->title = 'sso1';
$provider->url = 'http://sso1.loc/';
$provider->consumer_advanced = array(
'signature method' => 'HMAC-SHA512',
'request token endpoint' => '/oauth/request_token',
'authorization endpoint' => '/oauth/authorize',
@kotnik
kotnik / pre-commit
Created February 1, 2012 14:23
Drupal pre-commit hook
#!/bin/bash
# Author: Remigijus Jarmalavičius <[email protected]>
# Author: Vytautas Povilaitis <[email protected]>
# Modifications: Nikola Kotur <[email protected]>
ROOT_DIR="$(pwd)/"
LIST=$(git status | grep -e '\#.*\(modified\|added\)')
ERRORS_BUFFER=""
for file in $LIST
do
@kotnik
kotnik / kotnik_rsa.pub
Created January 9, 2012 10:55
Kotnik public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAv11JtNqeqxnonQelyHWzNiJMckYaZ8bgpBun8ZpFHs3+ZMEGmzxh2EkSUCfZ6guOMDlA9DrYchUTgzfwvkrQ05Bz+XHIO1c8a3aoNww1JZj7E6mYchOT7GnLS7Yq7Waj+sBvEDmbmh1s3I1jHC4Im/NJO+BwsMvmJskP/sG3WVM= kotnik@agnus
@kotnik
kotnik / gist:1183650
Created August 31, 2011 14:18 — forked from ngmaloney/gist:981766
my.drush.inc
<?php
/**
* @file My Drush Commands
*/
/**
* Implementation of hook_drush_help()
*/
function my_drush_help($section) {
switch ($section) {