Skip to content

Instantly share code, notes, and snippets.


Ben Schwarz benschwarz

Block or report user

Report or block benschwarz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
benschwarz /
Last active Jun 23, 2019
Awesome postgres

Keybase proof

I hereby claim:

  • I am benschwarz on github.
  • I am benschwarz ( on keybase.
  • I have a public key whose fingerprint is E7EA A491 E183 AA96 7629 BD41 F719 7B3B 8B26 9972

To claim this, I am signing this object:

View frontend.214fbad3580495fa3b83e3ec6b32a89e.css
.btn-group-vertical>.col-signup .signup .btn-facebook:not(:first-child):not(:last-child),
.btn-group-vertical>.col-signup .signup .btn-google:not(:first-child):not(:last-child),
.btn-group-vertical>.col-signup .signup .btn-login:not(:first-child):not(:last-child),
.btn-group-vertical>.col-signup .signup .btn-signup:not(:first-child):not(:last-child),
.btn-group-vertical>.frm-no-account .btn-go:not(:first-child):not(:last-child),
.btn-group-vertical>.nav-bar .menu-search li .btn-close:not(:first-child):not(:last-child),
.btn-group-vertical>.nav-bar .menu-search li .btn-search:not(:first-child):not(:last-child),
.btn-group-vertical>div[chart-view] .tablet-switch .first-half-btn:not(:first-child):not(:last-child),
.btn-group-vertical>div[chart-view] .tablet-switch .second-half-btn:not(:first-child):not(:last-child),
benschwarz /
Created Oct 14, 2015
Intercom CSP (Content security policy)

You'll need to add a whole slew of hosts for intercom if you've got CSP in place (which you should).

Heres what you'll need to add:

connect-src: wss:// wss:// 
benschwarz / gist:4171d8795b4f1f651a97
Last active Aug 29, 2015
iPhone games suggested to me by Twitter friends
View gist:4171d8795b4f1f651a97
  • Pocket dog fights
  • Battleheart
  • Steampunk
  • Bonza
  • Thomas was alone
  • Space age
  • Fotonica
  • 80 days
  • Sorcery!
  • Powder
benschwarz / bower.schema
Created Jun 10, 2014
Bower registry schema
View bower.schema
-- PostgreSQL database dump
-- Dumped from database version 9.3.4
-- Dumped by pg_dump version 9.3.4
-- Started on 2014-06-10 10:42:59 EST
SET statement_timeout = 0;
SET lock_timeout = 0;
benschwarz / .bowerrc
Last active Apr 3, 2019
Bower + Rails asset pipeline
View .bowerrc
"directory": "vendor/assets/components"
benschwarz / csrf-token.js
Created Apr 7, 2013
Set the CSRF token for Rails when doing Ajax requests
View csrf-token.js
define( ['jquery'], function ( $ ) {
var token = $( 'meta[name="csrf-token"]' ).attr( 'content' );
$.ajaxSetup( {
beforeSend: function ( xhr ) {
xhr.setRequestHeader( 'X-CSRF-Token', token );
return token;
View excerpt.html
<link rel="stylesheet" href="/stylesheets/screen.css">
<link rel="stylesheet" href="/stylesheets/narrow.css" media="screen and (max-width: 44em)">
<link rel="stylesheet" href="/stylesheets/medium.css" media="screen and (min-width: 44em) and (max-width: 65em)">
<link rel="stylesheet" href="/stylesheets/wide.css" media="screen and (min-width: 44em)">
<!--[if (gte IE 6)&(lte IE 8)]>
<link rel="stylesheet" href="/stylesheets/wide.css">
<script src="/javascripts/nwmatcher.min.js"></script>
<script src="/javascripts/selectivizr.min.js"></script>
benschwarz / vector-bg-with-fallback.scss
Last active May 19, 2017
SVG background image with PNG fallback (Sass mixin)
View vector-bg-with-fallback.scss
$public_path: "./";
@mixin vector-bg-with-fallback($name) {
background-image: url('#{$public_path}images/#{$name}.png');
background-image: none, url('#{$public_path}images/#{$name}.svg');
You can’t perform that action at this time.