Skip to content

Instantly share code, notes, and snippets.

herrbuerger

Block or report user

Report or block herrbuerger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eirikb
eirikb / clicktest.md
Last active Jun 14, 2018
Automated click testing in bash
View clicktest.md

About

This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.

Dependencies

@erichs
erichs / capfile.md
Last active Nov 22, 2017
Papers, Please
View capfile.md
    set :application, `basename $(pwd)`.chomp
    set :commit_sha, `git rev-parse --short "HEAD"`.chomp
    set :default_environment, {
      "RATIONALE_CLIENT" => "capistrano",
      "RATIONALE" => "'Deploying #{application} #{commit_sha}'"
    }
View deepdream-install.md
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active Nov 21, 2019
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/
View migrate_postgresql_database.md

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@tristanm
tristanm / README.md
Last active Dec 2, 2019
Migrating a Rails project from MySQL to PostgreSQL
View README.md

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.
@woglinde
woglinde / gist:0a7629a29e2228c4ac88
Created Nov 20, 2014
ssh force command demonstration
View gist:0a7629a29e2228c4ac88
#!/bin/sh
logger "SSH COMMAND is $SSH_ORIGINAL_COMMAND"
if test -n "$SSH_ORIGINAL_COMMAND" -a parse_to_allow($SSH_ORIGINAL_COMMAND) ; then
/bin/bash -c "$SSH_ORIGINAL_COMMAND"
else
logger "shell access denied"
fi
View fizzbuzz.arnoldc
IT'S SHOWTIME
HEY CHRISTMAS TREE isLessThan100
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE n
YOU SET US UP 0
HEY CHRISTMAS TREE multiple
YOU SET US UP @NO PROBLEMO
STICK AROUND isLessThan100
@ewherrmann
ewherrmann / resque.rake
Last active Mar 25, 2019
Collection of Resque related custom rake tasks from around the web
View resque.rake
require 'resque/tasks'
namespace :resque do
def del(key)
Resque.redis.keys(key).each { |k| Resque.redis.del(k) }
end
desc "Resque setup according to installation guide"
task :setup => :environment
@bradland
bradland / install_ruby.sh
Last active Dec 24, 2015
A reasonable Ruby install script. Includes "essential" deps.
View install_ruby.sh
# This build script will build Ruby 2.0.0-p247. You will need su to
# root or sudo as required.
# This build tested against Debian 7.0 64-bit arch, installed from net-inst image.
# These aren't specifically Ruby deps; more for building software in general
# (you probably already have them)
apt-get install -y build-essential autoconf
# These deps will support common libraries like yaml and give you the best irb experience.
@plentz
plentz / nginx.conf
Last active Jan 22, 2020
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
You can’t perform that action at this time.