Skip to content

Instantly share code, notes, and snippets.

View sethhorsley's full-sized avatar
🦾
who knows

Seth Horsley sethhorsley

🦾
who knows
View GitHub Profile
@sethhorsley
sethhorsley / memes
Created January 30, 2017 07:03 — forked from GlowingAshes/memes
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {
int userDay = 0;
int userYear = 0;
int userMonth = 0;
@GlowingAshes
GlowingAshes / memes
Last active January 30, 2017 07:03
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {
int userDay = 0;
int userYear = 0;
int userMonth = 0;
@lyquix-owner
lyquix-owner / lamp-ubuntu14.sh
Last active April 25, 2017 14:29
Bash script to setup LAMP server on Ubuntu 14.04
#!/bin/bash
# Check if script is being run by root
if [[ $EUID -ne 0 ]]; then
printf "This script must be run as root!\n"
exit 1
fi
DIVIDER="\n***************************************\n\n"
@noelboss
noelboss / git-deployment.md
Last active August 12, 2025 18:16
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@jrunning
jrunning / 01_mustache_liquid_benchmark.rb
Last active March 27, 2022 23:09 — forked from anonymous/01_mustache_liquid_benchmark.rb
Mustache vs. Liquid templates benchmark (naïve)
# This is a very basic benchmark of Mustache (1.0.2) vs.
# Liquid (3.0.6) rendering. It does two sets of benchmarks: One with
# "precompiled" templates (i.e. the Mustache::Template or
# Liquid::Template object is kept between runs) and one without (a new
# Template object is instantiated for each run). This benchmark tests
# a basic loop; no other features e.g. partials or conditionals
# are tested.
require "benchmark/ips"
require "mustache"
@rwarbelow
rwarbelow / running_app_in_production_locally.markdown
Created November 11, 2015 18:26
How to Run a Rails App in Production Locally
  1. Add gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.
  2. bundle
  3. Run RAILS_ENV=production rake db:create db:migrate db:seed
  4. Run rake secret and copy the output
  5. From the command line: export SECRET_KEY_BASE=output-of-rake-secret
  6. To precompile your assets, run rake assets:precompile. This will create a folder public/assets that contains all of your assets.
  7. Run RAILS_ENV=production rails s and you should see your app.

Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.

@squarism
squarism / iterm2.md
Last active September 25, 2025 22:29
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@maxivak
maxivak / readme.md
Last active February 19, 2025 23:23
Integrating Gem/Engine and Main Rails App
@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active July 11, 2025 05:01
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution