Skip to content

Instantly share code, notes, and snippets.

Avatar
📡
E.T. Phone Home

Parker Moore parkr

📡
E.T. Phone Home
View GitHub Profile
@parkr
parkr / passenger_on_ubuntu.sh
Last active Aug 29, 2015
Install ze things
View passenger_on_ubuntu.sh
#! /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 Mar 28, 2014
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.
View git-command-stats.txt
~$ git command-stats
{ ist: 1 }
{ be: 1 }
{ 'ls-files': 1 }
{ pgit: 1 }
{ pusgh: 1 }
{ at: 1 }
{ logg: 1 }
{ am: 1 }
{ siff: 1 }
View keybase.md

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:

View youtube-dl-wont-upgrade.txt
+ 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
View elastic-search-mapping.sh
# 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 Nov 22, 2013
BugHub Error (at launch, won't start)
View error-report.txt
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
View environment.rb
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 Nov 12, 2013
WordPress: Add photo/video upload capabilities to contributors.
View wp-add-upload-capabilities-to-contributor.php
<?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 Dec 28, 2015
liquid for loop of arbitrary values
View for-loop.html
<!-- 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 %}
View xcodeisanasshole
Warning: You have not agreed to the Xcode license.
Builds will fail! Agree to the license by opening Xcode.app or running:
xcodebuild -license
You can’t perform that action at this time.