Skip to content

Instantly share code, notes, and snippets.

View rafi's full-sized avatar

Rafael Bodill rafi

View GitHub Profile
@rafi
rafi / install-desk.sh
Last active December 21, 2015 01:09
Don't use it. Use Arch linux. ## Provisioning a new Ubuntu-based workstation, installs: - Git (latest, with repository `git-core/ppa`) - Java 6 (latest, with repository `webupd8team/java`) - f.lux (latest, with repository `kilian/f.lux`) - Google Chrome (latest) - PhpStorm (latest) - Sublime Text 2 (latest) - Virtualbox (latest) - CopyQ 1.9.1 - …
#!/bin/bash
# Check if we are root
if [ $UID -ne 0 ]; then
echo "Please run this as root!"
exit 255
fi
# Check if we are on Ubuntu
set distro=$(lsb_release -is)
@rafi
rafi / jetbrains-phpstorm.desktop
Created August 14, 2013 18:32
Linux desktop shortcuts
[Desktop Entry]
Version=1.0
Type=Application
Name=JetBrains PhpStorm
Exec="/opt/phpstorm/PhpStorm-129.487/bin/phpstorm.sh" %f
Icon=/opt/phpstorm/PhpStorm-129.487/bin/webide.png
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupNotify=true
@rafi
rafi / .gitignore
Created August 24, 2013 10:00
my crazy .gitignore for initializing a detached git repo for my ~/ dir
.hg/
*.swp
*.lock
# var
.adobe/
.cache/
.cpan/
/.fonts/
.gegl-*/
@rafi
rafi / dunstrc
Created September 15, 2013 21:13
dunst configuration file
[global]
font = EnvyCodeR 10
# allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough<s/>
# <u>underline</u>
#
# for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html
@rafi
rafi / folder_hierarchy.txt
Created November 9, 2013 13:13
Kohana multi-app and source-code bundles
. .
├── apps ├── apps
│   ├── foo │   ├── foo
│   │   ├── cache │   │   ├── cache
│   │   ├── config │   │   ├── config
│   │   ├── logs │   │   ├── logs
│   │   └── media │   │   └── media
│   └── bar │   └── bar
├── bin ├── bin
├── plugins ├── kohana
@rafi
rafi / Bridge.php
Last active September 6, 2016 14:17
phpspec+kohana 3.3 integration
<?php
// src/kohana/classes/Sortex/KohanaBundle/PhpSpec/Bridge.php
namespace Sortex\KohanaBundle\PhpSpec;
use PhpSpec\Extension;
use PhpSpec\ServiceContainer;
/**
* PHPSpec Kohana extension
@rafi
rafi / INSTALL.md
Last active December 30, 2015 20:19
My Arch Linux installation
@rafi
rafi / .gitconfig
Last active December 31, 2015 03:29
my ~/.gitconfig
# .-. .-. .-. .-. .-. .-. .-. .-. .-.
# `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
#
# Git config
# https://github.com/rafi/.config
#
[user]
name = Your Name
email = your@email.com
[github]
@rafi
rafi / hipchat_bitlbee.md
Last active January 1, 2016 12:39 — forked from taylor/HOWTO-bitlbee+hipchat.mkd
Connect to HipChat with bitlbee

HipChat with bitlbee

Initial setup

  • account add jabber USERNAME@chat.hipchat.com 'PASSWORD'
  • account hipchat set nick_source full_name
  • account hipchat set resource bot
  • account hipchat on

Listings

  • For nicks /join &hipchat
@rafi
rafi / routes.php
Last active January 2, 2016 03:59
Custom API for modded Kohana
<?php
Route::set('api', 'api/<version>/<controller>(.<format>)(/<id>)(/<custom>)',
array(
'version' => 'v1',
'id' => '\d+',
'format' => 'json|xml|csv',
))
->filter(function($route, $params, $request)
{