Skip to content

Instantly share code, notes, and snippets.

SELECT
date_trunc('month', ph1.created_at) AS date,
SUM(SUM(ph2.after - ph2.before))
OVER (
ORDER BY date_trunc('month', ph1.created_at)) AS mrr,
SUM(CASE WHEN ph1.event = 'new'
THEN (ph1.after - ph1.before)
ELSE 0 END) AS new,
SUM(CASE WHEN ph1.event = 'upsell'
THEN (ph1.after - ph1.before)
window.Components ||= {}
class Components.Comments
@render: (comments, target) ->
items = []
$.each comments, (key, val) ->
items.push '<li id=\'' + key + '\'>' + val + '</li>'
return
window.Views.Posts ||= {}
class Views.Posts.ShowView extends Views.ApplicationView
render: ->
super
# Chamando um Component
comments = @fetch_comments()
Components.Comments.render(comments, '#comments')
# Chamando Widgets
class Dropbox
constructor: ->
@options =
success: @success
cancel: ->
# Do something
linkType: 'direct'
multiselect: true
extensions: [
'.jpg'
func enableCorsJson(fn http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Header().Add("Access-Control-Allow-Origin", "*")
fn(w, r)
}
}
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+!+[]+[!+[]+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]
@hugodias
hugodias / README.md
Created June 11, 2016 16:24 — forked from rjorgenson/README.md
My ZSH Theme

agnoster.zsh-theme

forked by rjorgenson

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
  • NVM
  • RVM
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# Forked by rjorgenson - http://github.com/rjorgenson
#
# # README
#
# In order for this theme to render correctly, you will need a
# app/views/shared/_environment_banner.html.erb
<% unless Rails.env.production? %>
<div class="environment-banner <%= Rails.env %>">
<%= Rails.env %> | <%= "#{current_branch} @ #{current_sha}" %>
</div>
<% end %>
@hugodias
hugodias / pg.sh
Created May 26, 2016 13:29
Fixing: Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"
rm /usr/local/var/postgres/postmaster.pid