Skip to content

Instantly share code, notes, and snippets.

@dyerc
dyerc / sidekiq
Last active February 27, 2020 10:45
Sidekiq init script
#!/bin/bash
# sidekiq Init script for Sidekiq
# chkconfig: 345 100 75
#
# Description: Starts and Stops Sidekiq message processor for Stratus application.
#
# User-specified exit parameters used in this script:
#
# Exit Code 5 - Incorrect User ID
# Exit Code 6 - Directory not found
@dyerc
dyerc / exdeploy
Created January 7, 2016 15:36
A script to handle deploying a Phoenix web app
#!/bin/bash
APP="my-app"
REMOTE_USER="deployer"
SERVER="example.com"
BUILD_DIR="/usr/src/${APP}"
DEPLOY_DIR="/opt/${APP}"
############
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
"dump.rdb"
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz
tar -xvzf ruby-1.9.3-p362.tar.gz
cd ruby-1.9.3-p362/
./configure --prefix=/usr/local
make
make install
@dyerc
dyerc / My Sublime Text 2 Config
Last active December 10, 2015 21:48
My Sublime Text 2 Config
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"ensure_newline_at_eof_on_save": true,
"highlight_line": true,
"file_exclude_patterns":
[
".DS_Store",
@dyerc
dyerc / gist:3150027
Created July 20, 2012 10:21
Solr Tomcat Error
HTTP Status 500 - Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you want solr to continue after configuration errors, change: <abortOnConfigurationError>false</abortOnConfigurationError> in solr.xml ------------------------------------------------------------- org.apache.solr.common.SolrException at org.apache.solr.core.SolrCore.<init>(SolrCore.java:600) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:483) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:335) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:165) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.a
@dyerc
dyerc / endpoints_draft
Last active August 29, 2015 14:06
API Endpoints Draft / Thoughts
/teams
-> Dump all teams with their shortcode eg. wsh, njd, chi
/teams/njd/players
* season=20132014 (defaults to current or most recent)
-> Show statistics for all players on team in specified season
/teams/njd/games
* season=20132014 (defaults to current or most recent)
-> Show statistics for all players on team in specified season
@dyerc
dyerc / gist:3595a53939d2fb9193db
Created September 7, 2014 18:31
nhlscrapr integration
require 'rsruby'
r = RSRuby.instance
r.eval_R("library('nhlscrapr')")
#r.library('nhlscrapr')
data = r.eval_R('retrieve.game (season="20132014", gcode="21197")')
times = data["playbyplay"]["seconds"]
# cd.zsh-theme
#
# Based on:
# af-magic.zsh-theme
#
# Author: Andy Fleming
# URL: http://andyfleming.com/
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
#