Skip to content

Instantly share code, notes, and snippets.

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

Darek Finster regedarek

🏠
Working from home
View GitHub Profile
@regedarek
regedarek / pza-kamal-deployment.md
Last active April 10, 2024 10:35
Rails 7.1 + Kamal on OVH server
ssh ubuntu@146.59.94.122
sudo passwd root
sudo su
local: cat ~/.ssh/id_rsa.pub
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@dwayne
dwayne / 1-introduction.md
Last active August 22, 2016 04:37
My notes from the book "Riding Rails with AngularJS by Ari Lerner".
@kujohn
kujohn / portforwarding.md
Last active April 27, 2024 20:16
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@alex-zige
alex-zige / gist:5795358
Last active June 8, 2023 07:49
Rails Rspec API Testing Notes

Rails Rspec APIs Testing Notes

Folders Structure

  spec
  |--- apis #do not put into controllers folder. 
        |--- your_api_test_spec.rb  
  |--- controllers
  |--- models
  |--- factories
 |--- views
@IanVaughan
IanVaughan / hash_accessor.rb
Created June 6, 2013 08:40
Very basic way to access ruby hashes via method name.
module HashAccessor
def method_missing(name, *args, &block)
h = Hash[self.map{|(k,v)| [k.to_sym,v]}]
if h.has_key?(name.to_sym)
h[name.to_sym]
end
end
end
@krisleech
krisleech / 00_value_object.rb
Last active December 16, 2015 17:19
Array of value objects for ActiveRecord with/out serialize
class Leg
include ActiveModel::Validations
include ActiveModel::Naming
include ActiveModel::Conversion
include Virtus
attribute :start_day, Integer
attribute :end_day, Integer
end
@mbleigh
mbleigh / config.ru
Created April 8, 2013 23:34
Quick "Hello World" for running Grape and Sinatra together using Rack::Cascade.
# Put this in a new directory, then run `rackup`
require 'sinatra'
require 'grape'
class Web < Sinatra::Base
get '/' do
"Hello world."
end
end
@ryanb
ryanb / episode_search.rb
Created February 18, 2013 00:44
Class that handles the PostgreSQL full text search for railscasts.com
class EpisodeSearch
attr_reader :ability, :options
delegate :sanitize, to: Episode
def initialize(ability, options = {})
@ability = ability
@options = options.dup
end
def tag
@regedarek
regedarek / README.md
Last active December 13, 2015 18:08
Ckdatabase BOOTSTRAP DEPLOYING README

Baza CV Centrum Karier AGH

Aby dodać SSHkey na produkcje

  1. Skopjuj plik lokalnie
cat ~/.ssh/id_rsa.pub | pbcopy
  1. Wejdz na server
  2. Otwórz plik authorized keys