Skip to content

Instantly share code, notes, and snippets.

View amiroff's full-sized avatar

Metin Emiroğlu amiroff

View GitHub Profile
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<!-- ~/.fonts.conf for per-user font configuration -->
<fontconfig>
<!-- default fonts -->
<alias>
<family>serif</family>
<prefer>
<family>Droid Serif</family>
</prefer>
@amiroff
amiroff / zodiac_tag.py
Created January 6, 2011 09:56
Django template filter that returns appropriate zodiac for a given date (in Turkish)
register = template.Library()
@register.filter(name='zodiac')
def zodiac(value):
""" Return appropriate zodiac for a given date
Usage in templates: {{ your_object.date_of_birth|zodiac }} """
signs = (
(u"Oğlak", range(356, 365)),
(u"Oğlak", range(1, 20)),
(u"Kova", range(21, 52)),
(u"Balık", range(52, 79)),
@amiroff
amiroff / Preferences.sublime-settings
Last active July 29, 2017 21:09
My Sublime Text User Preferences File
{
"always_prompt_for_file_reload": false,
"auto_complete": false,
"auto_complete_commit_on_tab": true,
"auto_find_in_selection": false,
"caret_style": "phase",
"color_scheme": "Packages/User/Themes/Mac CLassic.tmTheme",
"copy_with_empty_selection": false,
"default_line_ending": "unix",
"diff_changes_to_buffer": true,
@amiroff
amiroff / MacClassic.tmTheme
Last active December 14, 2018 21:24
My custom modified Mac Classic Textmate/ST2 Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Chris Thomas</string>
<key>name</key>
<string>Mac Classic</string>
<key>settings</key>
<array>
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@amiroff
amiroff / gist:4148511
Last active October 13, 2015 05:48
Clean up the crap of Ubuntu Gnome Remix
sudo apt-get purge gnome-games-* xdiagnose aisleriot gnome-dictionary gnome-contacts gnumeric abiword cheese alacarte rhythmbox alacarte
sudo apt-get autoremove
sudo apt-add-repository ppa:gnome3-team/gnome3
sudo apt-add-repository ppa:webupd8team/sublime-text-2
sudo add-apt-repository ppa:mystic-mirage/komodo-edit
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install sublime-text-2-dev dkms ppa-purge oracle-java6-installer
sudo apt-get install htop tmux screen software-center jockey-gtk git-core mercurial vim font-manager xclip vim tasksel
@amiroff
amiroff / reference.md
Created February 4, 2013 21:23
Markdown reference

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax

@amiroff
amiroff / Custom.css
Last active December 14, 2015 01:19
Make Chrome dev tools look good under Linux
/**********************************************/
/*
/* Make Chrome dev tools look good under Linux
/* ~/.config/google-chrome/Default/User StyleSheets/Custom.css
/* chrome-devtools://devtools/devTools.css
/* See https://plus.google.com/115133653231679625609/posts/UZF34wPJXsL
/*
/**********************************************/
@amiroff
amiroff / Vagrantfile
Last active December 31, 2015 10:59
Vagrantfile example using Raring Ringtale and LAMP provisioning script
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 256
end
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.synced_folder "./" , "/vagrant/", :mount_options => ["dmode=777", "fmode=666"]
config.vm.provision :shell, :path => "https://gist.github.com/amiroff/7976592/raw/lamp.sh"
@amiroff
amiroff / lamp.sh
Last active December 31, 2015 10:59
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
#echo "--> Configuring locales <--"
#locale-gen en_US.UTF-8
#apt-get install language-pack-en-base
echo "--> Updating package db <--"
apt-get update