Skip to content

Instantly share code, notes, and snippets.

Michael Koukoullis kouky

Block or report user

Report or block kouky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kouky on github.
  • I am kouky (https://keybase.io/kouky) on keybase.
  • I have a public key whose fingerprint is 2F23 18F0 3EE0 5113 0FEF E16D 7B02 83E2 3467 8332

To claim this, I am signing this object:

@kouky
kouky / .travis.yml
Created Apr 11, 2014
iOS Travis yml
View .travis.yml
# Make sure to create a Shared Scheme for your application target
# http://docs.travis-ci.com/user/languages/objective-c/
language: objective-c
before_install:
- gem install cocoapods --no-rdoc --no-ri
before_script:
- brew update
@kouky
kouky / sublime-text-2-key-bindings
Created Sep 25, 2013
My Sublime Text 2 Key Bindings, created with the help of the awesome @benhoskings
View sublime-text-2-key-bindings
[
{ "keys": ["super+shift+e"], "command": "use_selection_for_replace"},
{ "keys": ["alt+g"], "command": "next_result"},
{ "keys": ["super+v"], "command": "paste_and_indent"},
{ "keys": ["shift+super+v"], "command": "paste"},
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["super+alt+f"], "command": "replace_next"},
{ "keys": ["super+ctrl+r"], "command": "reveal_in_side_bar"},
@kouky
kouky / gist:5596294
Last active Dec 17, 2015
Working with blake-data-models to filter by authors
View gist:5596294
# Get access to a Library object by locale, always scope by locale.
# A library object gives us convenience methods to access
# books, authors, fiction and non-fiction book code indices by locale.
# The files that drive these indices are located in blake/data/models/db/library/[product]/[subject-index].yml
library = BlakeDataModels::Library.new(locale: 'au', name: 'reading_eggspress')
# What series are available in the locale's library?
library.series_names # Generates array ["abc", "blake_novels", "boffin_boy", "brainwaves", ...]
View Beware object ids in mongo mapper
gem "mongo", "1.0"
gem "bson_ext", "1.0"
gem "mongo_ext", "0.19.3"
gem "mongo_mapper", "0.7.5"
require 'mongo_mapper'
MongoMapper.database = 'shopping'
class List
View action_mailer_for_sinatra.rb
# Configure ActionMailer
require 'action_mailer'
ActionMailer::Base.template_root = "#{File.dirname(__FILE__)}/views"
ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => "25",
:authentication => :plain,
:user_name => "username@domain.com",
:password => "yourpassword"
}
View struct_to_hash_example.rb
class Person < Struct.new(:name, :email, :gender)
def hash
pairs = []
each_pair {|key,val| pairs.push(key,val)}
Hash[*pairs]
end
end
View exemplor appears to run only one check
require 'exemplor'
eg 'appears to run only one check' do
name = 'michael'
Check(name).is('michael')
name = 'tim'
Check(name).is('tim')
name = 'myles'
View Exemplor Disambiguation Output
require 'exemplor'
eg 'working with an array' do
names = %w{Michael Tim Myles}
Check(names)[names]
# Output for disambiguation is not pretty
# (I) working with an array:
# (i) names MichaelTimMyles:
# - Michael
You can’t perform that action at this time.