Skip to content

Instantly share code, notes, and snippets.

View egoens's full-sized avatar

Erik Goens egoens

View GitHub Profile
@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 / .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 / 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 / doc.md
Last active December 29, 2016 13:57 — forked from oelmekki/doc.md
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails'
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@egoens
egoens / ScrollSpy.js
Created November 20, 2016 17:11 — forked from jquense/ScrollSpy.js
React ScrollSpy
import React, { PropTypes } from 'react';
import { findDOMNode } from 'react-dom'
import getOffset from 'dom-helpers/query/offset';
let ScrollSpy = React.createClass({
childContextTypes: {
$scrollSpy: PropTypes.shape({
anchor: PropTypes.func,
activeTarget: PropTypes.string
})
@egoens
egoens / aws.sh
Created November 2, 2016 18:15 — forked from conleym/aws.sh
Export AWS key variables based on profile name
# Shortcut for assigning a heredoc to a variable.
# http://stackoverflow.com/a/8088167
define() {
# read will have exit status 1 whenever it assigns to a variable or it gets to EOF.
read -r -d '' "${1}" || true
}
_other_aws_common_stuff() {
export AWS_DEFAULT_PROFILE="${AWS_PROFILE}"
local SCRIPT
@egoens
egoens / gist:bdc32d15fb871c4fea22
Last active August 29, 2015 14:13 — forked from jeradesign/gist:6747572
iOS Font List
2013-09-28 15:54:13.369 iOSFontListTest[3753:60b] Font Family Names (
"Academy Engraved LET",
"Al Nile",
"American Typewriter",
"Apple Color Emoji",
"Apple SD Gothic Neo",
Arial,
"Arial Hebrew",
"Arial Rounded MT Bold",
Avenir,

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods