Skip to content

Instantly share code, notes, and snippets.

View schneidmaster's full-sized avatar

Zach Schneider schneidmaster

View GitHub Profile
module.exports.cors = {
// Allow CORS on all routes by default? If not, you must enable CORS on a
// per-route basis by either adding a "cors" configuration object
// to the route config, or setting "cors:true" in the route config to
// use the default settings below.
allRoutes: true,
// Which domains which are allowed CORS access?
// This can be a comma-delimited list of hosts (beginning with http:// or https://)
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@schneidmaster
schneidmaster / keybase.md
Last active August 29, 2015 14:06
Keybase Verification

Keybase proof

I hereby claim:

  • I am schneidmaster on github.
  • I am schneidmaster (https://keybase.io/schneidmaster) on keybase.
  • I have a public key whose fingerprint is 52CB 6EAB 53C8 0D70 3C94 4A20 51C2 084C 8886 D61E

To claim this, I am signing this object:

@schneidmaster
schneidmaster / config.js
Created May 1, 2015 20:01
Sample Ghost Production Configuration
// # Ghost Configuration
// Setup your Ghost install for the production environment
// Documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment
@schneidmaster
schneidmaster / site.conf
Created May 1, 2015 21:40
Sample Ghost nginx Config
server {
server_name .yourdomain.com;
access_log /srv/www/yourdomain.com/logs/access.log;
error_log /srv/www/yourdomain.com/logs/error.log;
passenger_app_root /srv/www/yourdomain.com/public;
passenger_enabled on;
passenger_app_type node;
passenger_startup_file index.js;
Verifying I am +schneidmaster on my passcard. https://onename.com/schneidmaster
@schneidmaster
schneidmaster / policy.json
Created December 17, 2015 18:07
S3 policy to allow full access to a bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::BUCKET_NAME"
@schneidmaster
schneidmaster / SimpleHTTPServer.cs
Created September 23, 2015 22:34
Simple C# Webserver for Aha! access token
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;
using System.Threading;
using System.Diagnostics;
# Problem: https://twitter.com/AtticusGF/status/935977894651691008
#
# Stage 1 has 7 disks
# Stage 2 has 16 disks (or 7 + 3^2)
# Stage 3 has 41 disks (or 16 + 5^2)
# Stage 4 has 90 disks (or 41 + 7^2)
# so for each stage, add the incrementor squared and then
# increase the incrementor by 2
# Print off every million to avoid wasting too much
# time with terminal output
@schneidmaster
schneidmaster / .tool-versions
Last active January 19, 2018 10:03
Elixir/Phoenix + CircleCI config
erlang 18.0
elixir 1.3.2