This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" RENAME CURRENT FILE | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
function! RenameFile() | |
let old_name = expand('%') | |
let new_name = input('New file name: ', expand('%'), 'file') | |
if new_name != '' && new_name != old_name | |
exec ':saveas ' . new_name | |
exec ':silent !rm ' . old_name | |
redraw! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AuthApp | |
class CustomAuthentication < Devise::Strategies::Authenticatable | |
# This check is run before +authenticate!+ is called to determine if this | |
# authentication strategy is applicable. In this case we only try to authenticate | |
# if the login and password are present | |
# | |
def valid? | |
login && password | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prawn/labels' | |
names = %w[Jordan Chris Jon Mike Kelly Bob Greg] | |
Prawn::Labels.generate("names.pdf", names, type: "Avery5160", | |
document: { page_layout: :landscape }) do |pdf, name| | |
pdf.text name | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/app/views/admin/treatment_areas/index.html.haml | |
+++ b/app/views/admin/treatment_areas/index.html.haml | |
= header do | |
%h1 Treatment Areas | |
-%table.table.table-condensed.table-striped.table-hover | |
+%table | |
%thead | |
%tr | |
%th Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = Rack::Request.new(env) | |
current_scheme = if request.env['HTTPS'] == 'on' | |
'https' | |
elsif request.env['HTTP_X_FORWARDED_PROTO'] | |
request.env['HTTP_X_FORWARDED_PROTO'].split(',')[0] | |
else | |
request.scheme | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Middleware | |
class Www | |
STARTS_WITH_WWW = /^buildinghero\./i | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* $PostgreSQL: pgsql/contrib/citext/citext.sql.in,v 1.3 2008/09/05 18:25:16 tgl Exp $ */ | |
-- Adjust this setting to control where the objects get created. | |
SET search_path = public; | |
-- | |
-- PostgreSQL code for CITEXT. | |
-- | |
-- Most I/O functions, and a few others, piggyback on the "text" type | |
-- functions via the implicit cast to text. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :mailer do | |
desc 'Runs and emails daily reports to Geoff and Tom' | |
task :daily_reports => :environment do | |
report = Report.new | |
ReportMailer.daily_report(report).deliver | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SOFTWARE] | |
debug = yes | |
link = dexfil | |
pms = CTMOM | |
path = X:\passtodex1.dat | |
setup = DEXIS Integrator 1.0 3-17-2009 | |
country = us | |
window = 737 460 280 248 | |
hidden = no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a namespace for rafadc to work in | |
var ericgj = ericgj || {}; | |
ericgj.WordDrawing = { | |
// Snip .... | |
} |