Skip to content

Instantly share code, notes, and snippets.

View captproton's full-sized avatar

captproton captproton

View GitHub Profile
@captproton
captproton / gist:ccb00e693bec455b94c5
Created November 21, 2014 19:41
engine yard error
ERROR: Exception during deploy: #<EY::Serverside::RemoteFailure: The following command failed on server [ec2-54-164-74-155.compute-1.amazonaws.com(solo)]
$ ssh -i /home/deploy/.ssh/internal -o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/ey-ss-known-hosts20141110-19079-1enm80j -o PasswordAuthentication=no -o ServerAliveInterval=60 deploy@ec2-54-164-74-155.compute-1.amazonaws.com 'sh -l -c '\''export GIT_SSH="/data/email_extraction/shared/config/email_extraction-ssh-wrapper" && export LANG="en_US.UTF-8" && unset RUBYOPT BUNDLE_PATH BUNDLE_FROZEN BUNDLE_WITHOUT BUNDLE_BIN BUNDLE_GEMFILE && cd /data/email_extraction/releases/20141110220420 && ruby -S bundle _1.3.5_ install --gemfile /data/email_extraction/releases/20141110220420/Gemfile --path /data/email_extraction/shared/bundled_gems --binstubs /data/email_extraction/releases/20141110220420/ey_bundler_binstubs --deployment --without test development'\'
`mri_21` is not a valid platform. The available options are: [:ruby, :ruby_18,
:ruby_19, :ruby_20, :
@captproton
captproton / get_attachment_id.rb
Last active December 22, 2016 17:52
June 2014 Gmail API list emails with PDF attachements
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
class Post < ActiveRecord::Base
# validates :title, presence: true
# attr_accessible :title, :body, :image_url, :pubdate
attr_accessor :blog
def picture?
image_url.present?
end
@captproton
captproton / gist:6874190
Created October 7, 2013 20:15
Blog model
class Blog
attr_reader :entries
attr_writer :post_maker
# attr_accessible :post_maker, :entries
def initialize(entry_fetcher=Post.method(:all))
@entry_fetcher = entry_fetcher
end
@captproton
captproton / gist:6499587
Created September 9, 2013 18:29
rvm prob
[2013-09-09 11:26:25] requirements_osx_brew_update_system
requirements_osx_brew_update_system ()
{
if __rvm_version_compare "${_system_version}" -ge 10.7; then
__rvm_detect_xcode_version_at_least 4.6.2 || __CLT_version_at_least 4.6.0 || {
typeset ret=$?;
rvm_error "
Xcode version older than 4.6.2 installed, download and install newer version from:
http://connect.apple.com
@captproton
captproton / gist:6275115
Created August 19, 2013 22:47
access log
$ tail -f ~/Library/Logs/Pow/access.log
[Thu Jun 06 2013 20:36:16 GMT-0700 (PDT)] INFO [127.0.0.1] GET pow /status.json
[Fri Aug 02 2013 12:22:23 GMT-0700 (PDT)] INFO [127.0.0.1] GET pow /status.json
[Mon Aug 19 2013 12:51:07 GMT-0700 (PDT)] INFO [127.0.0.1] GET pow /status.json
[Mon Aug 19 2013 12:51:52 GMT-0700 (PDT)] INFO [127.0.0.1] GET pow /status.json
[Mon Aug 19 2013 15:03:39 GMT-0700 (PDT)] INFO [127.0.0.1] GET pow /status.json
@captproton
captproton / .powenv
Created August 19, 2013 22:42
.powenv
# detect `$rvm_path`
set -x
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
@captproton
captproton / gist:6274975
Created August 19, 2013 22:30
rvm info
$ rvm info
ruby-2.0.0-p247:
system:
uname: "Darwin captprotonlocal.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64"
system: "osx/10.8/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"
@captproton
captproton / gist:6227348
Created August 14, 2013 01:45
rvm errors
Making gemset ruby-2.0.0-p247 pristine......................
Error running '__rvm_with ruby-2.0.0-p247 /Users/captainproton/.rvm/scripts/gemsets pristine',
please read /Users/captainproton/.rvm/log/1376444595_ruby-2.0.0-p247/gemset.pristine-ruby-2.0.0-p247.log
Making gemset ruby-2.0.0-p247@Rails1.9.3p392_dice2013 pristine....
Making gemset ruby-2.0.0-p247@global pristine....
captainproton@captprotonlocal /Users/captainproton/code/RubyMotion/RubyMotionSamples/ios/Fonts $ less /Users/captainproton/.rvm/log/1376444595_ruby-2.0.0-p247/gemset.pristine-ruby-2.0.0-p247.log
__rvm_with ()
{
( __rvm_use "$1";
@captproton
captproton / gist:6054490
Created July 22, 2013 14:58
vulcan build error
$ vulcan build -v -s ./ghostscript-9.05
Packaging local directory... done
Uploading source package... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>