-
Don’t you know that freedom is a glorious thing of great worth? EPICTETUS
-
If you choose, you are free; if you choose, you need to blame no one and accuse no one Epictetus[5]
-
You can only control what is under your control.
-
What is not in your control is neither good nor bad.
-
Upadek / Albert Camus / 16.08.2018
-
Principles / Ray Dalio / 22.08.2018
-
Tao Te Ching / Lao-Tzu by Stephen Mitchell / 07.09.2018
-
Każdy krok niesie pokój / Thich Nhat Hanh / 14.09.2018
-
Turn the ship around / L. David Marquet
-
Unshakable Freedom: Ancient Stoic Secrets Applied to Modern Life / Chuck Chakrapani / 02.07.2019
Use http://koajs.com and deploy "Hello world!" application to https://zeit.co/now. Share application code on github.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Waiting for jasmine server on 55287... | |
jasmine server started. | |
Phantomjs does not appear to be installed in /home/rof/.phantomjs/1.9.8/x86_64-linux/bin/phantomjs, installing! | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
0 0 0 321 0 0 9269 0 --:--:-- --:--:-- --:--:-- 9269 | |
bunzip2: phantomjs-1.9.8-linux-x86_64.tar.bz2 is not a bzip2 file. | |
tar: phantomjs-1.9.8-linux-x86_64.tar: Cannot open: No such file or directory | |
tar: Error is not recoverable: exiting now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROM::Yesql::Repository.class_eval do | |
def initialize(uri, options = {}) | |
super | |
@connection = Sequel::Model.db | |
initialize_queries | |
ROM::Yesql::Relation.query_proc(query_proc) | |
ROM::Yesql::Relation.load_queries(queries) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = :bar if false | |
foo.nil? # => raises an error because...? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'benchmark' | |
REGEXPS = [ | |
/^no such file to load -- (.+)$/i, | |
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
/^Missing API definition file in (.+)$/i, | |
/^cannot load such file -- (.+)$/i, | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
def index | |
user_search = UserSearch.new(params[:user_search]) | |
@users = User.by_user_search(user_search) | |
end | |
end | |
# user search form object | |
class UserSearch | |
include Virtus.model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
include User::SearchScope | |
def index | |
search_params = params[:user_search] || {} | |
@users = apply_scopes(User, search_params) | |
end | |
end | |
class User < ActiveRecord::Base |
NewerOlder