Skip to content

Instantly share code, notes, and snippets.

View egoens's full-sized avatar

Erik Goens egoens

View GitHub Profile
@egoens
egoens / git-pull-all-repos.sh
Last active May 29, 2020 20:52
Pull current repo and any immediate sub-repos
# pull subrepos
gplall () {
# look into immediate subdirectories
for dir in ./*/
do
cd ${dir}
# check if exit status of above was 0, indicating we're in a git repo
if [ -d ".git" ]
then
# capture name of current branched checked out
@egoens
egoens / gifme.sh
Last active March 6, 2020 20:01
Gifme your videos
#!/usr/bin/env bash
# save this file on your local machine as 'gifme.sh' (or file name of your choice)
# run the following command wherever you saved this file:
# bash gifme.sh
# Check for Homebrew, install if we don't have it
echo "Installing Homebrew........"
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@egoens
egoens / GIF-Screencast-OSX.md
Created June 5, 2018 19:45 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@egoens
egoens / github-issue-creator-csv.rb
Created April 5, 2018 19:23
Github issue opener. Opens issues from a csv file format.
require 'optparse'
require 'csv'
# requires `ghi` gem is installed on your machine https://github.com/stephencelis/ghi
# As a protection mechanism, the actual generation of issues is commented out.
# when you've tested the output, the uncomment the `ghi` line in the try/accept
# block towards the bottom of this file
# ghi [command] -- [repo]
@egoens
egoens / .gitconfig
Created February 16, 2018 17:05 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@egoens
egoens / keybase.md
Created January 23, 2018 16:34
keybase.md

Keybase proof

I hereby claim:

  • I am egoens on github.
  • I am egoens (https://keybase.io/egoens) on keybase.
  • I have a public key ASACSS5T6KKJr5hvJCL49A4iaVvTxU0lwywvIfc0OiqUTwo

To claim this, I am signing this object:

@egoens
egoens / example_job.rb
Created April 1, 2017 22:20 — forked from hopsoft/example_job.rb
Render views outside of the standard request context (i.e. ActiveJob) with Devise/Warden
class ExampleJob < ApplicationJob
queue_as :default
def perform(user)
# do some work
# HACK: get around limitations in devise/warden when rendering
# views outside the context of a formal http request
renderer = ::ApplicationController.renderer.new
renderer_env = renderer.instance_eval { @env }
@egoens
egoens / postgres cheatsheet.md
Last active January 12, 2018 16:44 — forked from apolloclark/postgres cheatsheet.md
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@egoens
egoens / svgo-fonts.json
Created March 1, 2017 16:30
SVGO Font Compressor Configuration
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": true,
"indent": 2,
"plugins": [
{
"name": "cleanupIDs"
},
{
"name": "cleanupListOfValues",
@egoens
egoens / data.yml
Created January 27, 2017 17:26
Example data
---
:assignments:
:section_avg:
1:
:due: '2017-01-01'
:points_possible: 10
:points_received: 6
:title: Aspernatur accusamus quia natus cumque sed saepe eveniet.
2:
:due: '2017-01-04'