Skip to content

Instantly share code, notes, and snippets.

@sachsy
sachsy / Boilerplate: SEO
Created August 23, 2016 13:33 — forked from reedling78/Boilerplate: SEO
Boilerplate: SEO
<html>
<head>
<title>Site Title</title>
<meta name="description" content="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.">
<meta name="keywords" content="Keywords Tag - It can help but not hurt. Place 5-10 accurate, unique keywords in this tag for your page. Be sure that they match the actual page content.">
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
@sachsy
sachsy / bootstrap-basic-template.htm
Created August 12, 2016 14:47 — forked from justincarroll/bootstrap-basic-template.htm
This is my personal Bootstrap 3 and Font Awesome 4 basic HTML template.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Basic Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
@sachsy
sachsy / Contract Killer 3.md
Created May 18, 2016 12:37
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

var gulp = require('gulp');
var clean = require('gulp-clean');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var bases = {
app: 'app/',
@sachsy
sachsy / dep_rack.md
Created February 23, 2016 16:46 — forked from overdawn/dep_rack.md
Deplay rack based application on shared hosting using Passenger (hostmonster)

Deploy rack based application on shared hosting using Passenger (hostmonster)

Prepare the application

  1. Create folder ~/yourapp
  2. Create folder ~/yourapp/tmp
  3. Create file ~/yourapp/config.ru with the following content:
app = proc do |env|
@sachsy
sachsy / dep_sinatra.md
Created February 23, 2016 16:46 — forked from overdawn/dep_sinatra.md
Deploy Sinatra application on shared hosting using Passenger (hostmonster)

Deploy Sinatra application on shared hosting using Passenger (hostmonster)

Prepare the application

  • Create folder ~/yourapp
  • Create folder ~/yourapp/tmp
  • Create file ~/yourapp/config.ru with the following content:
# encoding: UTF-8
require './appmain'
@sachsy
sachsy / Javascript-snippets.js
Created February 2, 2016 15:39 — forked from msrafi/Javascript-snippets.js
Jquery: snippets
//JS Snippets
// Gets the browser prefix
var browserPrefix;
navigator.sayswho= (function(){
var N = navigator.appName, ua = navigator.userAgent, tem;
var M = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
if(M && (tem = ua.match(/version\/([\.\d]+)/i))!= null) M[2] = tem[1];
M = M? [M[1], M[2]]: [N, navigator.appVersion,'-?'];
M = M[0];
@sachsy
sachsy / class_instance_vars.rb
Created January 28, 2016 15:15 — forked from mcordell/class_instance_vars.rb
Class Instance Variables in Ruby.
class ClassVarTest
@variable = "Class Variable"
def self.get_class_variable
@variable
end
def get_object_variable
@variable
end
@sachsy
sachsy / Gemfile
Created January 28, 2016 14:55 — forked from vincentmilliken/Gemfile
Sinatra Heroku App
source :rubygems
gem 'sinatra'
gem 'compass'
gem 'haml'
gem 'sass'
gem 'rake'
gem 'data_mapper'
gem 'dm-core'
gem 'dm-postgres-adapter', :group => :production
@sachsy
sachsy / sinatra_cheatsheet.md
Created January 28, 2016 14:51 — forked from taktran/sinatra_cheatsheet.md
Sinatra cheatsheet

Useful commands

last_response
    .body

last_request
    .path
    .url
    .session

.cookies