Skip to content

Instantly share code, notes, and snippets.

View jorgegorka's full-sized avatar
🏠
Working from home

Jorge Alvarez jorgegorka

🏠
Working from home
View GitHub Profile
@jorgegorka
jorgegorka / gist:82387077e35fb2bcb6ea
Created October 21, 2014 10:10
start meteor with selected mongodb
export MONGO_URL=mongodb://localhost:27017/sageone && meteor
@jorgegorka
jorgegorka / new_message_form.cjsx
Last active August 29, 2015 14:23
New Message Form
NewMessageForm = React.createClass
handleSubmit: (e) ->
e.preventDefault()
description = React.findDOMNode(@refs.description).value.trim()
return unless description
Messages.insert({description: description})
React.findDOMNode(@refs.description).value = ''
render: ->
<div className="panel-footer">
messageSchema = new SimpleSchema
userId:
type: String
label: 'User'
index: true
optional: true
denyUpdate: true
description:
type: String
@jorgegorka
jorgegorka / messages.coffee
Created June 22, 2015 00:07
Messages allow deny
Messages.allow
insert: (userId, doc) ->
true
Messages.deny
remove: (userId, doc) ->
true

Keybase proof

I hereby claim:

  • I am jorgegorka on github.
  • I am jorgegorka (https://keybase.io/jorgegorka) on keybase.
  • I have a public key whose fingerprint is 8958 F02A 4C9D 04CF CF2C CB39 9D1C 01AD 90FE 57FD

To claim this, I am signing this object:

@jorgegorka
jorgegorka / track_interaction
Last active December 18, 2015 22:28
Track user interaction with Google Analytics
jQuery(function($) {
// last time we send tracking information
// default is 60 seconds ( converted to miliseconds )
var send_interval = 60 * 1000;
// Last time we send the event to GA
var last_time = new Date().getTime();
// Track mouse movement
$(window).mousemove(function() {
@jorgegorka
jorgegorka / config
Created July 10, 2013 12:39
tmux configuration
windows:
- name: "server ms1"
clear: true
root: "~/Sites/sage/mysageone_es/host_app"
splits:
- cmd: "ss"
- name: "server s1"
clear: true
root: "~/Sites/sage/sageone_es/host_app"
splits:
@jorgegorka
jorgegorka / tmux.conf
Created July 16, 2013 10:25
tmux configuration
unbind %
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Set status bar
set -g status-bg black
@jorgegorka
jorgegorka / alias
Created July 16, 2013 11:52
command line alias
alias WTF='git reset --hard'
alias be='bundle exec'
alias ber='bundle exec rake'
alias dbm='bundle exec rake db:migrate'
alias dbmt='bundle exec rake db:migrate RAILS_ENV=test'
alias dbr='bundle exec rake db:reset'
alias dbrt='bundle exec rake db:reset RAILS_ENV=test'
alias dbs='bundle exec rake db:seed --trace'
alias dbst='bundle exec rake db:seed --trace RAILS_ENV=test'
alias fb='bundle exec fudge build'
@jorgegorka
jorgegorka / pry alias
Created August 23, 2013 07:06
pry alias
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'