Skip to content

Instantly share code, notes, and snippets.

View timothyjoh's full-sized avatar
💪
flexin

Timothy Johnson timothyjoh

💪
flexin
View GitHub Profile
#
# Add this to the bottom of environment.rb
#
require 'smtp_tls'
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.smtp_settings = {
# download and git methods swiped from http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
rescue
puts "Can't get #{from} - Internet down?"
exit!
#!/usr/bin/env ruby
# Written by Kieran P
# http://github.com/KieranP
# http://twitter.com/k776
# http://k776.tumblr.com
#
# Feel free to fork and modify.
# If you do, send me a message on
# Github details changes and I'll
# crappy server implementation using technoweenie/oauth2 (server branch)
# http://github.com/technoweenie/oauth2/compare/master...server
#
# ruby oauth2_example.rb -p 4568
# ruby oauth2_example.rb
# open http://localhost:4567/auth/facebook
require 'rubygems'
require 'sinatra'
require 'oauth2/client'

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

<!DOCTYPE html>
<html lang="en">
<head>
<!-- added by alex dergachev -->
<base href="http://scratchpad.io/">
<title>Scratchpad</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body id="scratchpad" tabindex="0">
## SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
## BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
'use strict';
var _ = require('lodash');
// allow for parenthesis square brackets, curly braces
function check(input) {
var tokens = [[/\[/,/\]/],[/\{/,/\}/],[/\(/, /\)/]];
/*
search for the token pair on a string, starting with input
stem:
-
type: text
text: '<p>An OT revises an electronic medical record documentation template to more accurately report evidence-based practice information for each client. Which Core Value is the OT demonstrating?&nbsp;<br></p>'
answers:
-
choice:
-
type: text
text: '<p>Truth</p>'