Skip to content

Instantly share code, notes, and snippets.

View oliverbarnes's full-sized avatar

Oliver Azevedo Barnes oliverbarnes

View GitHub Profile
@jferris
jferris / configmap.yaml
Last active July 4, 2024 09:52
Rails Kubernetes Manifests
apiVersion: v1
kind: ConfigMap
metadata:
name: example
namespace: default
data:
APPLICATION_HOST: example.com
LANG: en_US.UTF-8
PIDFILE: /tmp/server.pid
PORT: "3000"
@jinjagit
jinjagit / auth.iex.exs
Last active July 3, 2020 16:16
adds aliases to iex shell for liquidvoting AUTH
# adds aliases and imports a / some module(s) to iex shell for liquidvoiting AUTH
# rename to .iex.exs and place in AUTH project root
# for dev environment, not production - add to / don't remove from your local gitignore
# <alias ... as> used to avoid referencing other module with name equivalent to alias
import Ecto.Query
alias LiquidVotingAuth.Application, as: App
alias LiquidVotingAuth.{
Organizations,
@jinjagit
jinjagit / api.iex.exs
Last active July 3, 2020 15:31
adds aliases to iex shell for liquidvoting API
# adds aliases and imports a / some module(s) to iex shell for liquidvoiting API
# rename to .iex.exs and place in API project root
# for dev environment, not production - add to / don't remove from your local gitignore
# <alias ... as> used to avoid referencing other module with name equivalent to alias
import Ecto.Query
alias LiquidVoting.Application, as: App
alias LiquidVoting.{
Delegations,
# # Fixing key bindings for `irb`
#
# when your ruby comes from `brew`, `rbenv`, and arrow keys don't work in your `irb`
brew upgrade readline rbenv ruby-install # ensure we have the `readline` library, and a recent version of `ruby-install` which will link to it properly when building `ruby`.
rbenv install <your-favourite-ruby-version> # rebuild ruby.
# watch out for the message 'ruby-build: use readline from homebrew' in output from the command above,
# then, go get some coffee.
# ...
@jamesmartin
jamesmartin / application_controller.rb
Created May 25, 2015 01:47
Testing ApplicationController before_filter methods using RSpec's "anonymous" controller instance
class ApplicationController < ActionControllerBase
helper :do_something
def do_something
@from_do_something = params[:for_do_something]
end
end
import Stream from 'ember-cli-i18n/utils/stream';
import t from 'ember-cli-i18n/utils/t';
import Ember from 'ember';
// tHelper without the container and application dependencies, sigh...
function tHelper(params /*, hash, options, env */) {
var path = params.shift();
var stream = new Stream(function() {
return t(path, params);
@kenliu
kenliu / binding-pry.sublime-snippet
Last active October 7, 2015 19:06
binding-pry.sublime-snippet
<snippet>
<content><![CDATA[
binding.pry
]]></content>
<tabTrigger>bp</tabTrigger>
<scope>source.ruby</scope>
</snippet>
--
provider: twitter
uid: '15280529'
info:
  nickname: penguinbusiness
  name: Charlie Moseley
  location: Bellevue, WA
  image: http://a1.twimg.com/profile_images/281933747/kitamura_ava_normal.gif
  description: Developer, Otaku, Geek.
  urls:
@holin
holin / Omniauth Twitter Hash
Created March 27, 2012 08:19 — forked from charliemoseley/Omniauth Twitter Hash
Twitter Authentication hash
--
provider: twitter
uid: '15280529'
info:
  nickname: penguinbusiness
  name: Charlie Moseley
  location: Bellevue, WA
  image: http://a1.twimg.com/profile_images/281933747/kitamura_ava_normal.gif
  description: Developer, Otaku, Geek.
  urls:
@krsmurata
krsmurata / rails_admin.pt-BR.yml
Created February 16, 2012 13:09 — forked from lribeiro/rails_admin.pt-PT.yml
Portuguese (pt-BR) translation for RailsAdmin 3.2
pt-BR:
views:
admin:
home:
name: Home
pagination:
previous: "&laquo; Anterior"
next: "Próximo &raquo;"
truncate: "…"
misc: