Skip to content

Instantly share code, notes, and snippets.

View gunharth's full-sized avatar

Gunharth Randolf gunharth

  • Innsbruck, Austria
View GitHub Profile
@gunharth
gunharth / PSR-2.sublime-build
Created February 27, 2016 15:08
Sublime Text 3 - PSR 2 Fixer Build
{
"shell_cmd": "php-cs-fixer fix $file --level=psr2"
}
@gunharth
gunharth / php-method.sublime-snippet
Created February 27, 2016 15:06
Sublime Text 3 - PHP Method Snippet
<snippet>
<content><![CDATA[
public function ${1}()
{
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>met</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@gunharth
gunharth / gist:571386658fc9d82d0fa6
Created December 30, 2015 15:08
Guni .gitignore file
# Folder view configuration files
.DS_Store
Desktop.ini
# Thumbnail cache files
._*
Thumbs.db
# Files that might appear on external disks
.Spotlight-V100
@gunharth
gunharth / gh-pages-deploy.md
Created November 5, 2015 11:33 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@gunharth
gunharth / gist:e497669833614eafc858
Created May 16, 2015 21:13
Ubuntu install Sublimetext 3 PPA
http://www.webupd8.org/2013/07/sublime-text-3-ubuntu-ppa-now-available.html
or
http://askubuntu.com/questions/172698/how-do-i-install-sublime-text-2-3
To use sublime as the default text editor instead of gedit, edit: /usr/share/applications/defaults.list by putting subl instead of gedit.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@gunharth
gunharth / gist:65f97dd3a40ab960cd1a
Created January 11, 2015 20:58
Docker: Remove all images and containers
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@gunharth
gunharth / .gaudi.yml
Last active August 29, 2015 14:09
gaudi.io: symfony2 setup (in progress)
applications:
apache:
type: apache
links:
- php_fpm
custom:
fastCgi: php_fpm
documentRoot: /var/www/web
modules:
- rewrite