Skip to content

Instantly share code, notes, and snippets.

View egoens's full-sized avatar

Erik Goens egoens

View GitHub Profile
@rbren
rbren / README.md
Last active July 1, 2021 22:09
Sync GitHub issues to spreadsheet

DataFire Dataflow: Sync GitHub issues to spreadsheet

Deprecated - DataFire is now out of beta. You can use the new version of this project on DataFire.io, or view it on GitHub

Pulls all new issues from a GitHub repo into a spreadsheet

View on DataFire

[metadata]: ./ '{"links":[{"connection":"563b9b84ea9ad5f345e97505","operation":{"method":"get","path":"/repos/{ownerId}/{repoId}/issues"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"get","path":"/list/{key}/{worksheetId}/{visibility}/{projection}"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"put","path":"/cells/{key}/{worksheetId}/{visibility}/{projection}/{cellId}"}},{"connection":"563b9b85ea9ad5f345e97511","operation":{"method":"post","path":"/list/{key}/{worksheetId}/{visibility}/{pro

@jquense
jquense / ScrollSpy.js
Created March 24, 2016 19:57
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
})
@conleym
conleym / aws.sh
Last active November 2, 2016 18:15
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
# This is to enable WS support. Credits: # https://gist.github.com/Bubelbub/0a942a0d51a3d329897d
# THIS WORKS! for running the example 5.0.0.beta1 chat app on a single instance Elastic beanstalk AWS instance
files:
"/etc/nginx/conf.d/websockets.conf" :
content: |
upstream backend {
server unix:///var/run/puma/my_app.sock;
}
@KeithP
KeithP / .ebextensions redis.config
Last active March 11, 2022 06:49
install redis on AWS EC2
packages:
yum:
gcc-c++: []
make: []
git: []
commands:
redis_script_01:
command: wget https://raw.github.com/KeithP/install-redis-amazon-linux-centos/master/redis-install-script.sh
redis_script_02:
command: chmod 777 redis-install-script.sh
@oelmekki
oelmekki / doc.md
Created December 30, 2015 19:37
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
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.

Rails 5 and ActionCable

Assumptions: The application already exists. You have two models article.rb and comment.rb. Articles have two attributes, title and text. Comments have two attributes, text and article_id. See these instructions if you need help getting started.

Routes

Assuming that you are nesting your :comments resources inside of :articles, mount ActionCable and make sure you have a root.

config/routes.rb

Rails.application.routes.draw do
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active September 23, 2023 09:38
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@joyrexus
joyrexus / README.md
Last active January 20, 2017 12:08
Abbo’s Alley I

Abbo's Alley I

Quick demo showing how to add Sewanee trail data to a map using Mapbox GL JS.

The key building blocks here are sources and layers. Sources contain the underlying geo data. Layers let you specify how to style this data.

In our demo we're adding two data sources: the trail route for one section of Abbo's Alley and markers indicating exit points. The trail data was taken from a geojson file containing information about all trails on the Domain.

About Abbo's Alley

@egoens
egoens / psql_table_exporter.sh
Created August 14, 2015 16:57
Shell script for exporting all tables for any given postgresql database_name
#!/bin/bash
# exports separate sql files for each table in the db. excludes "pg_" and "sql_" prefixed tables
for table in $(psql database_name -t -c "Select table_name From information_schema.tables Where table_type='BASE TABLE' and table_name not like 'pg_%' and table_name not like 'sql_%'");
do pg_dump -t $table database_name > /path/to/export/your/tables/$table.sql;
done;