Skip to content

Instantly share code, notes, and snippets.

View tgodfrey's full-sized avatar

Tyler Godfrey tgodfrey

  • Twin Cities, MN
View GitHub Profile
@tiagoefmoraes
tiagoefmoraes / gist:6382815
Created August 29, 2013 20:09
convert ruby hash syntax with RubyMine Regex Replacer
=>(\S) with => $1
([^<\s])=> with $1 =>
(?<!:):([\w\d_]+)(\s*)=> with $1:
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@apolloclark
apolloclark / postgres cheatsheet.md
Last active November 15, 2024 05:23
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@bellbind
bellbind / Dockerfile
Last active August 27, 2024 12:32
[docker] ruby-1.8.7 with rails-2.3.18 image
# docker build -t ruby-1.8.7 .
# docker run -it --rm ruby-1.8.7
FROM ubuntu:16.04
WORKDIR /root
RUN apt update
RUN apt upgrade -y
RUN apt install -y ruby-build autoconf subversion bison
RUN apt install -y mecab mecab-ipadic-utf8 wget