Skip to content

Instantly share code, notes, and snippets.

View ferhatelmas's full-sized avatar
🚀

ferhat elmas ferhatelmas

🚀
View GitHub Profile
#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883
linecache19-0.5.13.gem
ruby_core_source-0.1.5.gem
ruby-debug19-0.11.6.gem
ruby-debug-base19-0.11.26.gem
#Then in your console
export RVM_SRC=/your/path/to/ruby-1.9.3
@ferhatelmas
ferhatelmas / clojure-match.clj
Created September 5, 2012 20:26 — forked from ckirkendall/clojure-match.clj
Language Compare F#, Ocaml, Scala, Clojure, Ruby and Haskell - Simple AST example
(use '[clojure.core.match :only [match]])
(defn evaluate [env [sym x y]]
(match [sym]
['Number] x
['Add] (+ (evaluate env x) (evaluate env y))
['Multiply] (* (evaluate env x) (evaluate env y))
['Variable] (env x)))
(def environment {"a" 3, "b" 4, "c" 5})
@ferhatelmas
ferhatelmas / gist:3711080
Created September 13, 2012 00:52 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@ferhatelmas
ferhatelmas / cliches.md
Created October 21, 2012 22:44
business cliches

89 sophisticated cliches that business people should know by heart (src:forbes)

  1. It’s a paradigm shift = I don’t know what’s going on in our business. But we’re not making as much money as we used to.

  2. We’re data-driven = We try not to make decisions by the seat of our pants. When possible, we try to base them in facts.

  3. We need to wrap our heads around this = Gosh, I never thought of that. We need to discuss that….

  4. It’s a win-win = Hey, we both get something out of this (even though I’m really trying to get the best from you)

@ferhatelmas
ferhatelmas / done.md
Created October 22, 2012 23:59
The cult of Done Manifesto

The Cult of Done Manifesto

  1. There are three states of being. Not knowing, action and completion.
  2. Accept that everything is a draft. It helps to get it done.
  3. There is no editing stage.
  4. Pretending you know what you're doing is almost the same as knowing what you are doing, so just accept that you know what you're doing even if you don't and do it.
  5. Banish procrastination. If you wait more than a week to get an idea done, abandon it.
  6. The point of being done is not to finish but to get other things done.
  7. Once you're done you can throw it away.
  8. Laugh at perfection. It's boring and keeps you from being done.
@ferhatelmas
ferhatelmas / good_to_great.md
Created October 31, 2012 23:56
Good to Great Heuristics

Good to Great

  • Humble leaders
  • Right people on the bus
  • Confront facts (ability to see facts beforehand)
  • Focus: Money, skills
  • Dedication: Rinsing your cottage cheese and closing doors of what you don't really want
  • Technology, otherwise equilibrium can not be leveraged
  • Super mix: idea combination
@ferhatelmas
ferhatelmas / better.md
Created November 6, 2012 02:40
How to work better

How to work better:

  1. Do one thing at a time / Ah desire to keep the doors open
  2. Know the problem / No happy ending
  3. Learn to listen / Best thing I do
  4. Learn to ask questions / Very related to the ability of writing good tests
  5. Distinguish sense from nonsense / Don't be involved in the discussion of editors, instead find the optimal customization of your editor
  6. Accept change as inevitable / The only thing doesn't change is change
  7. Admit mistakes / Prepare interrupt handler
  8. Say it simple / KISS and DRY
@ferhatelmas
ferhatelmas / q1.sage
Created November 8, 2012 23:13
sage drill
K = 214805
P = Primes()
p, q = P.next(K^8+1), P.next(K^8+K^4+K+1)
x = crt(1, 2, p, q)
print x
@ferhatelmas
ferhatelmas / questions.md
Created November 8, 2012 23:52
Questions to be asked in a search

Heilmeier's Catechism

  1. What are you trying to do? Articulate your objectives using absolutely no jargon.
  2. How is it done today, and what are the limits of current practice?
  3. What's new in your approach and why do you think it will be successful?
  4. Who cares?
  5. If you're successful, what difference will it make?
  6. What are the risks and the payoffs?
  7. How much will it cost?
  8. How long will it take?
@ferhatelmas
ferhatelmas / qsort.scala
Created November 15, 2012 20:02
QuickSort in Scala
def qsort(list: List[Int]): List[Int] = list match {
case Nil => Nil
case head :: tail => qsort(tail.filter(_ < head)) ::: head :: qsort(tail.filter(_ >= head))
}