Skip to content

Instantly share code, notes, and snippets.

View kouky's full-sized avatar

Michael Koukoullis kouky

View GitHub Profile
@kouky
kouky / keybase.md
Created August 21, 2018 10:36
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 April 11, 2014 09:50
iOS 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 September 25, 2013 23:41
My Sublime Text 2 Key Bindings, created with the help of the awesome @benhoskings
[
{ "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 December 17, 2015 10:39
Working with blake-data-models to filter by authors
# 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", ...]
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
# 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 => "[email protected]",
:password => "yourpassword"
}
class Person < Struct.new(:name, :email, :gender)
def hash
pairs = []
each_pair {|key,val| pairs.push(key,val)}
Hash[*pairs]
end
end
require 'exemplor'
eg 'appears to run only one check' do
name = 'michael'
Check(name).is('michael')
name = 'tim'
Check(name).is('tim')
name = 'myles'
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