Skip to content

Instantly share code, notes, and snippets.

View dotemacs's full-sized avatar

Александар Симић dotemacs

View GitHub Profile
@rubiojr
rubiojr / mr_status_bar_app.rb
Created November 30, 2009 11:47
MacRuby StatusBar Application
#
# Initialize the stuff
#
# We build the status bar item menu
def setupMenu
menu = NSMenu.new
menu.initWithTitle 'FooApp'
mi = NSMenuItem.new
mi.title = 'Hellow from MacRuby!'
mi.action = 'sayHello:'
@jamis
jamis / Basic Oi (Cucumber) Kimchi
Created November 6, 2010 20:07
Basic Oi (Cucumber) Kimchi
BASIC OI (CUCUMBER) KIMCHI
--------------------------------------------------------------------------
Oi (cucumber) kimchi is a delicious, refreshing variation on the
traditional Korean kimchi recipe.
This particular recipe is a modified version of the recipe posted by Dr.
Ben Kim, at http://www.drbenkim.com/how-to-make-cucumber-kim-chi.htm.
--------------------------------------------------------------------------
@nolman
nolman / async_io.rb
Created July 7, 2011 05:56
Async IO
require 'rubygems'
require 'eventmachine'
require 'em-http-request'
require 'fiber'
EventMachine.run do
http = EM::HttpRequest.new('http://www.google.com').get
begin
puts "Before"
http.callback {
@pogin503
pogin503 / init-smartchr.el
Created November 19, 2011 14:27
smartchr.elの設定ファイル
;;;; init-smartchr.el ---- smartchr
;; -*- Mode: Emacs-Lisp -*-
;; INSTALL
;; (install-elisp "https://github.com/imakado/emacs-smartchr/raw/master/smartchr.el")
(require 'smartchr)
;;; @see http://d.hatena.ne.jp/tequilasunset/20101119/p1
;; smartchr-func start

Hi [your name here], thanks for getting in contact with me.

I sincerely appreciate the interest in [your company name here] hiring me, however there is several problems with this:

  1. I have just signed a lease on a new property in Melbourne. The lease is for one year. This means that I am effectively tied to Melbourne for one year.
  2. I have only recently (November) started a job for Spree Commerce. I like/love this job and would like to stay there.
  3. I have no formal qualifications past a certificate IV in Network Administration. I think qualifications are bullshit. Getting me into America would prove very difficult for your company. I am, of course, assuming you would want me on-site. Although I've written a book on the framework that I'd be hired to do work with, I doubt that would assist the process any. See #1 also for a very valid reason why this would not be possible.

I think that you would have more of an effect just by getting to know one person really well than getting to know one hundred peopl

@josevalim
josevalim / exp.md
Created June 18, 2012 11:05
Possibly faster spec runs

This is an experiment for possible faster boot time (and consequently faster feedback) when running tests. I ask your help to try this in your apps (any Rails 3.x app) and let me know how well it works.

How to

Add the following lines inside the configuration block in config/environments/test.rb:

config.cache_classes = true
def eager_load!; end
@mtnygard
mtnygard / gist:7555463
Last active May 22, 2017 10:59
The limitations of test

From Out of the Tar Pit:

The key problem with testing is that a test (of any kind) that uses one particular set of inputs tells you nothing at all about the behaviour of the system or component when it is given a different set of inputs. The huge number of different possible inputs usually rules out the possibility of testing them all, hence the unavoidable concern with testing will always be — have you performed the right tests?. The only certain answer you will ever get to this question is an answer in the negative — when the system breaks.

This is a strong argument for some form of generative, simulation, or property-based testing.

@john2x
john2x / 00_destructuring.md
Last active July 9, 2024 01:38
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@reborg
reborg / rich-already-answered-that.md
Last active July 11, 2024 09:54
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@pesterhazy
pesterhazy / promises-passing-values.cljs
Last active October 24, 2021 00:55
Promise chains in ClojureScript and the problem of previous values
(ns my.promises
"Demo to show different approaches to handling promise chains in ClojureScript
In particular, this file investigates how to pass data between Promise
callbacks in a chain.
See Axel Rauschmayer's post
http://2ality.com/2017/08/promise-callback-data-flow.html for a problem
statement.