Skip to content

Instantly share code, notes, and snippets.

View danhere's full-sized avatar
🌽
Shucks

Dan Saksa danhere

🌽
Shucks
  • Veoci
  • New Haven, Connecticut
  • 11:28 (UTC -04:00)
View GitHub Profile
@danhere
danhere / .vimrc
Created March 15, 2017 21:08
My vimrc
" Use vim settings, rather then vi settings (much better!)
" This must be first, because it changes other options as a side effect.
set nocompatible
" ==========================================================================
" Plugins
" ==========================================================================
call plug#begin('~/.vim/plugged')
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@danhere
danhere / main.sass
Created March 14, 2012 16:44
Oasis Sass
//Live
$images: "../../img/oasis";
//Local
//$images: "../img";
//===================//
// Standard styles //
//===================//
$body: #333;
$fonts: "Merriweather, Georgia, Times New Roman, serif";
cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:danhere/nests.git master"
command finished in 1619ms
* executing "if [ -d /var/apps/nests/shared/cached-copy ]; then cd /var/apps/nests/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard fd3b5076669f626edf5bef911dfb678a5398ca09 && git clean -q -d -x -f; else git clone -q git@github.com:danhere/nests.git /var/apps/nests/shared/cached-copy && cd /var/apps/nests/shared/cached-copy && git checkout -q -b deploy fd3b5076669f626edf5bef911dfb678a5398ca09; fi"
servers: ["meettimes.com"]
@danhere
danhere / sadface.log
Created October 24, 2011 02:47
Capistrano Errors
$ cap deploy:cold
* executing `deploy:cold'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:danhere/nests.git master"
command finished in 1204ms
* executing "if [ -d ~/apps/nests/shared/cached-copy ]; then cd ~/apps/nests/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard fd3b5076669f626edf5bef911dfb678a5398ca09 && git clean -q -d -x -f; else git clone -q git@github.com:danhere/nests.git ~/apps/nests/shared/cached-copy && cd ~/apps/nests/shared/cached-copy && git checkout -q -b deploy fd3b5076669f626edf5bef911dfb678a5398ca09; fi"
servers: ["meettimes.com"]
@danhere
danhere / deploy.rb
Created October 24, 2011 02:26
My Capistrano Deploy
set :application, "nests"
set :repository, "git@github.com:danhere/nests.git"
set :scm, :git
set :user, "dan"
set :deploy_to, "~/apps/#{application}"
set :deploy_via, :remote_cache
set :keep_releases, 5
set :branch, "master"
set :use_sudo, false
@danhere
danhere / results_controller.rb
Created April 24, 2011 15:53
Results controller
class ResultsController < ApplicationController
before_filter :authenticate_admin!, :except => [:index, :show]
caches_page :show
respond_to :html, :xml
def index
@results = Result.find(:all, :order => 'created_at DESC').paginate(:page => params[:page])
end
def show
@danhere
danhere / Error from log
Created February 2, 2011 22:04
Results_Controller
Started POST "/results" for xxx.xxx.xxx.xxx at 2011-02-02 16:57:44 -0500
Processing by ResultsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"x1Fxj2OGNfbGs6fDskHa7jB3LhJswDkEUG4BYOx2iBw=", "result"=>{"title"=>"Testing", "short_url"=>"test", "result_file"=>#<ActionDispatch::Http::UploadedFile:0xba42ae4 @original_filename="ljrind11.htm", @content_type="text/html", @headers="Content-Disposition: form-data; name=\"result[result_file]\"; filename=\"ljrind11.htm\"\r\nContent-Type: text/html\r\n", @tempfile=#<File:/tmp/RackMultipart20110202-29224-1qc2x8y>>, "created_at(1i)"=>"2011", "created_at(2i)"=>"2", "created_at(3i)"=>"2"}, "commit"=>"Upload"}
Completed in 232ms
Errno::EACCES (Permission denied - /var/apps/nests/public/tmp/results):
app/controllers/results_controller.rb:18:in `create'
<%= form_for @live do |f| %>
<%= render "shared/error_messages", :target => @live %>
<%= f.label :title, "Title of Event:" %>
<%= f.text_field :title %>
<br />
<%= f.label :content, "Any Additional Content:" %><br />
<%= f.text_area :content %>
<br />
<%= form_for(@result, :html => {:multipart => true}) do |f| %>
<% if @result.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@result.errors.count, "error") %> prohibited this result from being saved:</h2>
<ul>
<% @result.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>