Skip to content

Instantly share code, notes, and snippets.

View harley's full-sized avatar

Harley Trung harley

View GitHub Profile
@jaredatron
jaredatron / knapsack_amend.rb
Created April 11, 2016 23:19
# Monkey Patch Knapsack to merge reports instead of overwrite
# Monkey Patch Knapsack to merge reports instead of overwrite
begin
class Knapsack::Report
alias_method :save_without_leading_existing_report, :save
def save
Knapsack::Presenter.existing_report = open
save_without_leading_existing_report
end
end
@djonsson
djonsson / install_elasticsearch_osx.md
Last active November 11, 2022 21:10
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@jamtur01
jamtur01 / ladder.md
Last active May 17, 2024 07:29
Kickstarter Engineering Ladder
@staltz
staltz / introrx.md
Last active June 2, 2024 11:03
The introduction to Reactive Programming you've been missing
@caseywatts
caseywatts / ldapexample.rb
Last active August 29, 2015 14:02
LDAP Example
#Yale LDAP Example
require 'csv'
require 'net-ldap'
# Hashrocket Format
{:host => 'directory.yale.edu', :port => 389}
# "New" Format, requires keys be symbols
{host: 'directory.yale.edu', port: 389}
@schneems
schneems / asset_sync_is_the_devil.md
Last active June 19, 2021 00:12
I hate asset_sync

A not politically correct assertion of my feelings towards a piece of software:

Note: Repetition builds cynicism, asset_sync isn't bad, but when an asset problem cannot be solved via support it gets escalated to me. Often times someone using asset_sync the problem is due to their use of the library and not from Heroku.

Backstory

The asset sync gem uploads your assets (images, css, javascript) to S3. From there you can either point browsers to the copy on S3 or use a CDN + the S3 bucket. It's a good idea, and solved a problem at one time.

It is no longer needed and you should now use https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn instead. So rather than copying your assets over to S3 after they are precompiled the CDN grabs them from your website instead. Here's some reasons why it's better.

@jtadeulopes
jtadeulopes / server.md
Last active March 29, 2024 10:23
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone

@danguita
danguita / osx-development-setup.md
Last active June 2, 2016 13:37
Set up your shiny OSX for development
@toolmantim
toolmantim / Procfile
Last active December 12, 2015 09:39
@ddollar's foreman Ruby gem is handy for booting a single app's processes, but you can also use foreman as a booter for mutiple foreman apps! Handy if you have apps that work together in a service-oriented way and you're sick of booting them one-at-a-time (or you're using a harness shell script).
app_1: foreman start --root app_1 --port 3000 --env app_1/.env
app_2: foreman start --root app_2 --port 3100 --env app_2/.env
app_3: foreman start --root app_3 --port 3200 --env app_3/.env