Skip to content

Instantly share code, notes, and snippets.

View clops's full-sized avatar
🎯
Focusing

Alexey Kulikov clops

🎯
Focusing
  • clops.at
  • Vienna, Austria
View GitHub Profile
@clops
clops / DefaultController.php
Created August 19, 2013 13:15
This is how to configure a Service in Symfony 2 with dynamic parameters. No magic, but still awesome.
<?
//..
//the following will return an Instance of InstagramAPI ... configured and ready to roll!
$this->get('instagram');
//..
?>
@clops
clops / gist:6827472
Created October 4, 2013 15:04
Wiener Linien Daten direct Links
http://data.wien.gv.at/csv/wienerlinien-ogd-haltestellen.csv
http://data.wien.gv.at/csv/wienerlinien-ogd-linien.csv
http://data.wien.gv.at/csv/wienerlinien-ogd-steige.csv
@clops
clops / JavaScriptGames.txt
Last active January 25, 2021 20:26
Crazy! Collection of JavaScript games made in under 35 lines of code
36 Line Tetris --> http://jsfiddle.net/ova777/kFxja/
30 Line Sokoban --> http://jsfiddle.net/zabbius/nU74f/
34 Line Minesweeper --> http://jsfiddle.net/c884a/
30 Line Arcanoid --> http://jsfiddle.net/martin_/Fq8F4/
30 Line Snake --> http://jsfiddle.net/Uk2PP/9/
30 Line Excel --> http://jsfiddle.net/zag2art/b3pbw/4/
30 Line Race --> http://jsfiddle.net/Minimajack/C545E/embedded/result/
37 Line PONG --> http://jsfiddle.net/WNrfp/6/
@clops
clops / config
Created February 3, 2014 10:11 — forked from dtjm/config
### ~/.subversion/config
### Add this line to the [helpers] section
diff-cmd = ~/bin/svn-diffwrap.sh
@clops
clops / firebug.js
Last active August 29, 2015 13:56
Need a quick test for a POST request? Paste the following into your FireBug Console
//create a handler
var xhr = new XMLHttpRequest();
//define where the data will be sent to
xhr.open("POST", "http://someawesomehost/");
//set some chololate headers
xhr.setRequestHeader("Content-type", "application/json");
//and send ya content
@clops
clops / deploy.php
Last active August 1, 2022 11:41
GIT P4T Console Deploy
#!/usr/bin/php
<?php
/**
* GIT Merge Helper
*
* Installation:
* 1. Download / Clone this GIST https://gist.github.com/clops/3ac9cd6c42a66ba65101 into some directory
* 2. chmod a+x deploy.php
* 3. Add an alias into .bash_profile with a full path to the deploy.php script, mine is:
* alias deploy="~/dev/3ac9cd6c42a66ba65101/deploy.php"
@clops
clops / .bash_prompt
Created August 6, 2014 08:42
Shell prompt based on the Solarized Dark theme with GIT Watchers
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@clops
clops / commit-msg
Created November 3, 2014 14:43
GIT Hook to Prepend the ZEN card to the commit message
#!/bin/sh
card=$(git symbolic-ref HEAD | awk -F- '/ZEN-/ {print $2}')
if [ -n "$card" ]; then
echo "ZEN-$card " | cat - $1 > /tmp/out && mv /tmp/out $1
fi
@clops
clops / .bash_prompt
Last active July 8, 2016 13:26
My Bash Prompt with GIT Branch Name
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;