Skip to content

Instantly share code, notes, and snippets.

View paracycle's full-sized avatar

Ufuk Kayserilioglu paracycle

View GitHub Profile
@paracycle
paracycle / .powrc
Created May 29, 2013 15:50 — forked from nbibler/gist:5307941
A .powrc file that respects .rvmrc, .ruby-version and .ruby-gemset files.
if [ -f "$rvm_path/scripts/rvm" ]; then
source "$rvm_path/scripts/rvm"
if [ -f ".rvmrc" ]; then
source ".rvmrc"
fi
if [ -f ".ruby-version" ]; then
rvm use `cat .ruby-version`
fi
@paracycle
paracycle / Gemfile
Last active December 17, 2015 09:59 — forked from ethnt/Gemfile
How to use Sidekiq with Padrino on Heroku. This config enables you to run sidekiq inside your "web" dyno (See https://coderwall.com/p/fprnhg for details)
# ...
gem 'sidekiq'
gem 'slim'
gem 'unicorn'
# ...
@paracycle
paracycle / sluggenerator.cs
Created November 30, 2012 18:24 — forked from onebeatconsumer/sluggenerator.cs
Slug Generator - C# - String Extension Method
/// <summary>
/// Generates a permalink slug for passed string
/// </summary>
/// <param name="phrase"></param>
/// <returns>clean slug string (ex. "some-cool-topic")</returns>
public static string GenerateSlug(this string phrase)
{
var s = phrase.RemoveAccent().ToLower();
s = Regex.Replace(s, @"[^a-z0-9\s-]", ""); // remove invalid characters
s = Regex.Replace(s, @"\s+", " ").Trim(); // single space
@paracycle
paracycle / rails_admin.tr.yml
Created June 7, 2012 13:57
Rails Admin Turkish translation
tr:
admin:
home:
name: "Anasayfa"
pagination:
previous: "&laquo; Önceki"
next: "Sonraki &raquo;"
truncate: "…"
misc:
filter_date_format: "dd/mm/yy" # a combination of 'dd', 'mm' and 'yy' with any delimiter. No other interpolation will be done!