Skip to content

Instantly share code, notes, and snippets.

Kyriacos Souroullas kyriacos

View GitHub Profile
View gist:b5e44bff64539e6e664c9fc5c30c701d
### Keybase proof
I hereby claim:
* I am kyriacos on github.
* I am kyriacos ( on keybase.
* I have a public key ASCuIinPfOilaiQ7n4XWUD5Bc8VXYSvSCCGXrM3nNVxHYwo
To claim this, I am signing this object:
View .eslintrc
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
Basic atom config for work.
kyriacos /
Last active Jan 4, 2016
Useful unix commands (practical quick examples)


find files using name in the current directory

find . -name filename.txt

find files ignoring case

find / -type d -name filename

find all rb file with name

find . -type f -name *.rb

View Hybrid.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Blue Component</key>
<key>Green Component</key>
View carrierwave_init.rb
CarrierWave.configure do |config|
config.fog_credentials = {
provider: 'AWS',
aws_access_key_id: ENV['S3_KEY'],
aws_secret_access_key: ENV['S3_SECRET']
config.fog_directory = "client-" + Rails.env
config.fog_public = true
config.fog_attributes = {'Cache-Control' => 'max-age=315576000'}
View friendly_urls.markdown

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:


But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.

kyriacos / gist:2162649
Created Mar 22, 2012 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide
View gist:2162649

A Capistrano Rails Guide

by Jonathan Rochkind,

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

kyriacos / dnsd.rb
Created Jan 26, 2012 — forked from peterc/dnsd.rb
Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
View dnsd.rb
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# By Peter Cooper
# MIT license
# * Not advised to use in your production environment! ;-)
# * Requires Ruby 1.9
# * Supports A and CNAME records
# * See for protocol guidance
# * All records get the same TTL
You can’t perform that action at this time.