Skip to content

Instantly share code, notes, and snippets.

View oshanz's full-sized avatar
🌴
On vacation

Oshan Wisumperuma oshanz

🌴
On vacation
View GitHub Profile
require 'benchmark/ips'
my_array = [100, 101, 100, 102, 100, 100, 101, 100, 250, 251, 253, 260, 250, 200, 100, 100, 100, 100, 100, 100, 100, 100, 100, 120]
index_and_repetitions = lambda { |my_array|
stk = {}
previous = my_array[0]
last_index = 0
stk[last_index] = 1
my_array.drop(0).each_with_index do |item, index|
@oshanz
oshanz / functional ruby.txt
Created January 10, 2019 07:42
functional ruby
users_url = URI('https://jsonplaceholder.typicode.com/users')
calls = -> method_name, *args {
-> object {
object.public_send(method_name, *args)
}
}
gets_value = -> key_name { calls[:[], key_name] }
email_ends_with = -> what {
gets_value['email'] >> calls[:end_with?, what]
}
@oshanz
oshanz / Game Development
Last active November 19, 2018 08:31
Game Development
http://www.gamasutra.com/view/feature/131472/game_design__theory_and_practice_.php
http://www.gamasutra.com/view/feature/132341/the_13_basic_principles_of_.php
http://www.paranoidproductions.com/gamedesign/about.html
https://github.com/hzoo/awesome-gametalks
https://github.com/ellisonleao/magictools#must-see
https://www.learning-theories.com/dopamine-games-motivation.html
https://github.com/petehouston/awesome-gamedev-series
@oshanz
oshanz / elevator pitch.txt
Last active October 30, 2018 07:36
elevator pitch
1. whats he working for
2. demostration
3. creepy, awkward, weird - time span
4. how you quite
* your story; how you get
* what are you looking for
* evaluation
* brand
@oshanz
oshanz / samz-pm
Created October 26, 2018 11:17
samz-pm
http://people.brunel.ac.uk/~mastjjb/jeb/or/netpert.html
https://pmstudycircle.com/2013/08/pert-program-evaluation-and-review-technique/
http://www.pondiuni.edu.in/sites/default/files/Part%20II%20Operations%20Management.pdf
file:///Users/oshanw/Downloads/B&T(part7).pdf
https://www.uky.edu/~dsianita/300/projmgt.html

Contributing

Your contributions are always welcome!

Guidelines

  • Add one link per Pull Request.
  • Add the link: * [project-name](http://example.com/) - A short description ends with a period.
    • Keep descriptions concise.
  • Add a section if needed.
@oshanz
oshanz / Things Employees Really Need to Hear From You
Last active September 27, 2018 05:02
Things Employees Really Need to Hear From You
1. "I need your help."
2. "What do you need from me?"
3. "I noticed what you did."
4. "Thank you."
5. "Hey, everyone--listen to what Joe accomplished!"
6. "What would you like to do here?"
7. "I have bad news."
8. "What do you think?"
9. "That's OK. We all make mistakes."
10. "I know you can do it."
@oshanz
oshanz / Effectively Communicate Your Strategic Plan To Employees
Created September 26, 2018 04:50
Improve the Relationship with Stakeholders
Ensure that team results are disseminated rapidly and effectively
* Communication strategy with a long-term vision
* Initiate the dialogue as soon as possible
* Use smart goals in the communication strategy, which are specific, measurable, achievable, results-oriented and timely
* Perform quality control of the relationship with the various stakeholders.
It should be noted that this can change qualitatively over the project
* clear objectives, and allocated resources and budget
* avoid confusion, frustration, or anxiety
* manage risk
@oshanz
oshanz / gist:4270b96ac41e8263ab08e4a969f4a599
Last active June 21, 2019 04:35
profile benchmark ruby performance
Benchmark
https://rbspy.github.io/
Profile
@oshanz
oshanz / Financial Freedom
Last active September 12, 2018 10:57
Financial Freedom
* immediately put 10% of your money aside (on another account for example).
Before paying any rent, any taxes, any loan, food, clothes…”
* Earned vs. Passive Income
* "job security" myth
* credit cards
 A low annual percentage rate (APR). The lower the rate, the less interest you have to pay. Low introductory