I hereby claim:
- I am alexhartley on github.
- I am alexhartley (https://keybase.io/alexhartley) on keybase.
- I have a public key whose fingerprint is D3D6 5330 9D63 8220 E101 75BD 2131 3ADA 2822 7712
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Define some constants | |
define( "RECIPIENT_NAME", "John Smith" ); | |
define( "RECIPIENT_EMAIL", "john@example.com" ); | |
define( "EMAIL_SUBJECT", "Visitor Message" ); | |
// Read the form values | |
$success = false; | |
$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : ""; | |
$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : ""; | |
$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : ""; |
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Matt Hamm's Page Curl Boxes · CodePen</title> | |
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css"> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mobile First Grids · CodePen</title> | |
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/normalize.css"> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mobile First Grids · CodePen</title> | |
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/normalize.css"> |
source 'http://rubygems.org' | |
ruby '1.9.3' | |
gem 'rails', '3.2.7' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' |
require 'rspec' | |
class Risk | |
def code(user) | |
user_site = user.site[0..1] | |
if department | |
department_name = department.name[0..1] | |
end | |
[user_site,department_name,"001"].compact.join('-').upcase |
class DCode | |
def initialize(assessment, user) | |
@assessment = assessment | |
@user = user | |
end | |
def code | |
"#{site.name[0,2]}-#{department_code}".upcase | |
end |
Modified from the gist @https://gist.github.com/odiumediae/3b22d09b62e9acb7788baf6fdbb77cf8 | |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev | |
#Optional: so vim can be uninstalled again via `dpkg -r vim` | |
sudo apt-get install checkinstall | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim |