Skip to content

Instantly share code, notes, and snippets.

@Meettya
Meettya / gist:2342550
Created April 9, 2012 09:40
Object Method
/*
Public method to get all settings at once
*/
Configurator.prototype.get_all = function() {
return this._settings;
};
@Meettya
Meettya / gist:2342544
Created April 9, 2012 09:39
Object Method
###
Public method to get all settings at once
###
get_all: ->
@_settings
@Meettya
Meettya / hack.sh
Created March 31, 2012 16:34 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@Meettya
Meettya / observer.coffee
Created February 17, 2012 21:45 — forked from sdiehl/observer.coffee
Observer Pattern in Coffeescript
# app/environment/observer.coffee
###
This module for global Observer
very simple implementation, but works
and support method chaining
###
module.exports = class Observer
@Meettya
Meettya / gist:1771885
Created February 8, 2012 18:16
another rvm install 1.9.3 error - brew command
brew install readline
brew link readline
brew install libxml2
brew link libxml2
brew install libiconv
brew link libiconv
@Meettya
Meettya / gist:1771874
Created February 8, 2012 18:13
another rvm install 1.9.3 error log
compiling readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:1472: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1472: error: (Each undeclared identifier is reported only once
readline.c:1472: error: for each function it appears in.)
{standard input}:3102:non-relocatable subtraction expression, "L_rl_filename_completion_function$non_lazy_ptr" minus "L00000000036$pb"
{standard input}:3102:symbol: "L_rl_filename_completion_function$non_lazy_ptr" can't be undefined in a subtraction expression
{standard input}:3064:non-relocatable subtraction expression, "L_rb_eIndexError$non_lazy_ptr" minus "L00000000035$pb"
{standard input}:3064:symbol: "L_rb_eIndexError$non_lazy_ptr" can't be undefined in a subtraction expression
{standard input}:3057:non-relocatable subtraction expression, "L_history_length$non_lazy_ptr" minus "L00000000035$pb"
@Meettya
Meettya / gist:1771824
Created February 8, 2012 18:05
another rvm install 1.9.3 error log
compiling openssl_missing.c
In file included from openssl_missing.c:22:
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’
/opt/local/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here
openssl_missing.h:95: error: conflicting types for ‘EVP_CIPHER_CTX_copy’
/opt/local/include/openssl/evp.h:459: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here
openssl_missing.h:173: error: conflicting types for ‘BN_rand_range’
/opt/local/include/openssl/bn.h:419: error: previous declaration of ‘BN_rand_range’ was here
openssl_missing.h:177: error: conflicting types for ‘BN_pseudo_rand_range’
/opt/local/include/openssl/bn.h:420: error: previous declaration of ‘BN_pseudo_rand_range’ was here
@Meettya
Meettya / gist:1770551
Created February 8, 2012 15:45
rvm install 1.9.3 error log
<... skip ...>
compiling stubs.c
In file included from stubs.c:8:
stubs.h:1:17: error: tcl.h: No such file or directory
In file included from stubs.c:8:
stubs.h:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
stubs.h:10: error: expected ‘)’ before ‘*’ token
stubs.h:11: error: expected ‘)’ before ‘*’ token
stubs.c:16:16: error: tk.h: No such file or directory
@Meettya
Meettya / namespaces.coffee
Created February 4, 2012 00:05 — forked from StanAngeloff/namespaces.coffee
A quick and dirty way to use namespaces in CoffeeScript
# Code:
#
namespace = (target, name, block) ->
[target, name, block] = [exports ? window, arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
# Usage:
#
@Meettya
Meettya / gist:1732961
Created February 3, 2012 22:00 — forked from pmuellr/gist:1004413
BBEdit Language Module for CoffeeScript
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
BBEdit Language Module for CoffeeScript
Put this file in
~/Library/Application Support/BBEdit/Language Modules
or equivalent.
Based off of the examples shipped in the BBEdit SDK.