Skip to content

Instantly share code, notes, and snippets.

View parkr's full-sized avatar
📡
E.T. Phone Home

Parker Moore parkr

📡
E.T. Phone Home
View GitHub Profile
---
layout: yearly
year: 2013
---
@parkr
parkr / passenger_on_ubuntu.sh
Last active August 29, 2015 14:00
Install ze things
#! /bin/bash
set -e
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates
sudo echo 'deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main' > /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
@parkr
parkr / git-command-stats.txt
Created March 28, 2014 01:55
I was just trying out Max Ogden's npm package "git-command-stats" and was so amused with how often I fuck up that I wanted to share these results.
~$ git command-stats
{ ist: 1 }
{ be: 1 }
{ 'ls-files': 1 }
{ pgit: 1 }
{ pusgh: 1 }
{ at: 1 }
{ logg: 1 }
{ am: 1 }
{ siff: 1 }

Keybase proof

I hereby claim:

  • I am parkr on github.
  • I am parkr (https://keybase.io/parkr) on keybase.
  • I have a public key whose fingerprint is 00D2 B366 BC9A 9B44 2D87 B59F 7AB4 982E 8099 3F1C

To claim this, I am signing this object:

+ brew doctor
Your system is raring to brew.
+ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 014c6dd119315eb70d694456c90838605334dad9
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.9.1-x86_64
# LIST MAPPING
curl -s private:9200/users/_mapping | js
# CREATE MAPPING
curl -XPUT 'private:9200/zo/zo/_mapping' -d '
{
"zo_mapping" : {
"properties" : {
"curationCount" : {"type" : "long" },
"featuredCount" : {"type" : "long" },
@parkr
parkr / error-report.txt
Created November 22, 2013 05:02
BugHub Error (at launch, won't start)
Process: BugHub [1557]
Path: /Applications/BugHub.app/Contents/MacOS/BugHub
Identifier: com.rclconcepts.BugHub.mac
Version: 1.0.1 (2)
App Item ID: 633342015
App External ID: 15225369
Code Type: X86-64 (Native)
Parent Process: launchd [233]
Responsible: BugHub [1557]
User ID: 501
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:user_name => ENV["SMTP_USERNAME"], # <-- this line
:password => ENV["SMTP_PASSWORD"], # <-- this line
@parkr
parkr / wp-add-upload-capabilities-to-contributor.php
Created November 12, 2013 04:45
WordPress: Add photo/video upload capabilities to contributors.
<?php
function wpc_contributor_uploads() {
$contributor = get_role('contributor');
$contributor->add_cap('upload_files');
}
if ( current_user_can('contributor') && !current_user_can('upload_files') ){
add_action('admin_init', 'wpc_contributor_uploads');
}
?>
@parkr
parkr / for-loop.html
Last active December 28, 2015 01:19
liquid for loop of arbitrary values
<!-- liquid v 2.5.4 -->
{% assign my_array = "1,2,3,4,5" | split:"," %}
{% for item in my_array %}
{{item}}
{% endfor %}
<!-- or -->
{% for item in (1..5) %}
{{item}}
{% endfor %}