Skip to content

Instantly share code, notes, and snippets.

View aujkis's full-sized avatar
🎯
Focusing

Austris aujkis

🎯
Focusing
View GitHub Profile
@rolandoislas
rolandoislas / Moved.md
Last active March 2, 2016 17:22
Smite Install script for PlayOnLinux/PlayOnMac
@lmars
lmars / flynn-mongodb.txt
Created March 14, 2015 16:37
Flynn MongoDB
# create a mongo app
flynn create --remote "" mongo
# create a release using the latest (at the time of writing) Docker MongoDB image
flynn -a mongo release add -f config.json "https://registry.hub.docker.com?name=mongo&id=216d9a0e82646f77b31b78eeb0e26db5500930bbd6085d5d5c3844ec27c0ca50"
# scale the server to one process. This may time out initially as the server pulls the image, but watch "flynn -a mongo ps" and it should come up.
flynn -a mongo scale server=1
# mongo should now be running in the cluster at mongo.discoverd:27017
@Epigene
Epigene / RSpec Workflow
Created March 4, 2015 10:18
RSpec Workflow
========== RSpec Workflow ==========
1 # Add gem stack
group :development, :test do
# Test stack
gem "rspec-rails", '~> 3.2.0'
gem "spring-commands-rspec" #Spring for rspec ^
gem "factory_girl_rails"
gem "guard-rspec"
gem 'rb-fsevent', '~> 0.9.1'
gem "faker" #šis ģenerē dummy/fake datus pēc pieprasījuma
@Epigene
Epigene / cheatsheet.txt
Created July 15, 2014 13:16
Spring installation cheatsheet
Installing Spring
On master branch:
1. $ bundle install
2. $ brew install direnv
3. edit shell config (~/.bashrc / .zshrc / config.fish), add at the very end:
eval "$(direnv hook bash)"
eval "$(direnv hook $0)" # for zsh
eval (direnv hook fish) # for fish
4. $ cd ~/project
DB -> Local
ssh deployer@37.139.21.15
pg_dump --format=c -h localhost --username norden nordenhealth > latest.dump
scp deployer@37.139.21.15:/home/deployer/latest.dump ~/Desktop/
source ~/.bashrc && rake db:drop && rake db:create && pg_restore --verbose --clean --no-acl --no-owner -h localhost -U sac -d nordenhealth_development ~/Desktop/latest.dump
rake db:migrate RAILS_ENV=test && rake db:seed RAILS_ENV=test
Local -> DB
source ~/.bashrc && pg_dump --format=c -h localhost --username sac nordenhealth_development > ~/Desktop/t_latest.dump
scp ~/Desktop/t_latest.dump deployer@188.226.246.199:/home/deployer/t_latest.dump
@pincheira
pincheira / homebrew.rb
Last active July 1, 2016 17:07
Working version of Homebrew for OS X 10.10

Working version of Homebrew for OS X 10.10

The only way to get working Homebrew on OS X 10.10 for now (10.10 beta was just released a couple of hours ago) is by using an special fork by @jacknagel available at https://github.com/jacknagel/homebrew/tree/rb2.

To install this working version of Homebrew just execute:

ruby -e "$(curl -fsSL https://gist.githubusercontent.com/jpincheira/bd3698fee46735fac252/raw/2c6a2f81927871c1a64e2dfbbc5eef451c71a9ac/homebrew.rb)"

@tsutsu
tsutsu / HOWTO-CoreOS-on-DO.md
Last active September 25, 2016 09:14
CoreOS on DigitalOcean (using "Debian 7 x64" as a base)
  1. run sudo apt-get install squashfs-tools kexec-tools
  2. copy "update.sh" to /usr/sbin/update-coreos, and make it executable
  3. copy "create-docker-store.sh" to /usr/sbin/create-coreos-docker-store, and make it executable
  4. copy "cloud-config.yml" to /etc/default/coreos, modifying it to suit your preferences
  5. run sudo update-coreos -d
  6. reboot
@wojtha
wojtha / Locales.yaml
Created January 15, 2014 10:13 — forked from s-andringa/Locales.yml
config.exceptions_app and ExceptionController
# config/locales/en.yml
en:
exception:
show:
not_found:
title: "Not Found"
description: "The page you were looking for does not exists."
internal_server_error:
title: "Internal Server Error"
@tzvetkoff
tzvetkoff / gist:7287456
Last active January 8, 2019 06:44
Make it more test-ish
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', :github => 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@keichan34
keichan34 / active_record_marshalable.rb
Created September 5, 2013 11:33
Get Marshal.dump and Marshal.load to load cached association objects ( Whatever.includes(:example_models) ), as well.
module ActiveRecordMarshalable
def marshal_dump
[attributes, self.association_cache, instance_variable_get(:@new_record)]
end
def marshal_load data
send :initialize, data[0]
instance_variable_set :@association_cache, data[1]
instance_variable_set :@new_record, data[2]
end