Skip to content

Instantly share code, notes, and snippets.

View Spoygg's full-sized avatar

Ivan Ivanić Spoygg

View GitHub Profile
services:
some_nice_handle_that_strikes_your_fancy:
class: Symfony\Bundle\DoctrineMongoDBBundle\Security\DocumentUserProvider
arguments: [@doctrine.odm.mongodb.document_manager, 'SpoyggProfajlerBundle:Profileuser', 'username']
encoders:
Spoygg\ProfajlerBundle\Document\Profileuser: plaintext
@Spoygg
Spoygg / crontab-gui-app
Created June 7, 2012 14:29
Start gui application through crontab. Add 'export DISPLAY=:0 && '
0 3 * * * export DISPLAY=:0 && your_favorite_application
$e = new Exception;
var_dump($e->getTraceAsString());
@Spoygg
Spoygg / gist:3111679
Created July 14, 2012 14:42
Set custom keyboard layout
setxkbmap -symbols 'pc+yg+inet(evdev)+level3(ralt_alt)+level3(rwin_switch)+capslock(none)+level3(menu_switch)'
@Spoygg
Spoygg / publication-merge.php
Created July 14, 2012 15:26
Merge publication prevods to single page prevod
<?php
// First fetch all prevods
// Mysql call
$sql = "
SELECT ID, post_title, post_content, post_parent, post_name
FROM wp_rscom_posts
WHERE post_parent
IN (
SELECT ID
FROM wp_rscom_posts
@Spoygg
Spoygg / gist:3122226
Created July 16, 2012 11:29
Keyboard switches for XKB setxkbmap
altwin:menu = +altwin(menu)
altwin:meta_alt = +altwin(meta_alt)
altwin:ctrl_win = +altwin(ctrl_win)
altwin:meta_win = +altwin(meta_win)
altwin:left_meta_win = +altwin(left_meta_win)
altwin:super_win = +altwin(super_win)
altwin:hyper_win = +altwin(hyper_win)
altwin:alt_super_win = +altwin(alt_super_win)
altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
grp:switch = +group(switch)
@Spoygg
Spoygg / gist:3137273
Created July 18, 2012 16:22
Notes for lecture: Law of Attraction
Zakon privlačnosti
Od primećivanja do manifestacije
iliti Kako pomoći sebi da imaš sve što poželiš
* Prvi korak je da nešto primetiš u svojem okruženju.
Primeri:
Ideš ulicom i vidiš nešto
Na netu si naletiš na nešto
* Drugi korak je želja
Primeri:
Video si nešto i želiš to za sebe
@Spoygg
Spoygg / initialize-os.sh
Created July 20, 2012 04:59
Script to run after installation of OS.
# Setup Vim
# For persist Vim undo history beyond closing file
mkdir ~/.vim-meta-files
# Link Vim config to sync with Dropbox
ln -s ~/Dropbox/vim ~/.vim
ln -s ~/.vim/vimconfig ~/.vimrc
echo "Vim setup."
#Customize OS
# Import custom keyboard layout
// Legacy code - do not remove
$isResidential = $values['residential'] != 'no';
$inquiry = RateInquiryPeer::create(
$values['CollectionAddress']['CountryCode'],
$values['CollectionAddress']['City'],
$values['CollectionAddress']['PostalCode'],
$values['DestinationAddress']['CountryCode'],
$values['DestinationAddress']['City'],
$values['DestinationAddress']['PostalCode'],