Skip to content

Instantly share code, notes, and snippets.

Tom Milewski tmilewski

Block or report user

Report or block tmilewski

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
tmilewski / formstack-embed-using-postscribe.html
Created Apr 29, 2019 — forked from matt-bailey/formstack-embed-using-postscribe.html
Embed a Formstack form asynchronously, using Postscribe
View formstack-embed-using-postscribe.html
<!-- Main form wrapper, required for styling the form -->
<div class="webform">
<!-- Empty div (must have a unique ID), into which the form will be loaded -->
<div id="formstack-bridal-appointment"></div>
<script type="text/javascript">// <![CDATA[
// Only run the code below when jQuery says the document is ready
(function($) {
// Process the form using postscribe:
// 1. Must reference the unique ID of the div above
View powssl


  • Install stud $ brew install
  • Download and install the powssl script $ curl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
    • $ powssl
# Licence: MIT
# Created by tomykaira, 2011-10-25
if [ $# -ne 1 ]; then
echo "Give me your new project name (only)"
exit 1
View gist:4075538
var sendParam = function(p) {
// sends a GET request, no jQuery or wrapper needed
(new Image).src = '/my_route?p='+encodeURIComponent(p);
tmilewski / gist:3933235
Created Oct 22, 2012 — forked from wesgarrison/gist:3921560
October 19 2012 - - notes on server
View gist:3933235

[transcript from and irc]

Why is the server unhappy?

  • Bundle API is 70%-80% of traffic and it has to resolve the dependency graph and Marshal
  • x Processes are spinning in Ruby with 380% (of 400% total CPU [4 x 100%])
  • x Bundle can only use vanilla gems, so that's why we have to use Marshal
  • Redis Heapsize
  • Diskspace

Timing - middle of the day US

tmilewski / gist:2694412
Created May 14, 2012 — forked from yuki24/gist:1187574
testing facebook connect with capybara and rspec
View gist:2694412
require 'mogli'
module FacebookIntegrationHelpers
shared_context "with unconnected facebook user" do
let(:fb_user) { create_test_user(installed: false) }
after { fb_user.destroy }
def app_client, AppConfig.facebook.app_id)
tmilewski / facebook_registration.rb
Created May 7, 2012 — forked from nicalpi/facebook_registration.rb
Testing Omniauth with Devise, Rspec and Capybara
View facebook_registration.rb
background do
click_link_or_button 'Sign up with Facebook'
tmilewski / app.rb
Created Mar 26, 2012 — forked from cpatni/app.rb
unique calculation using redis
View app.rb
require 'sinatra'
require 'redis'
require 'json'
require 'date'
class String
def &(str)
result = ''
View gist:382881
# Author: John Trupiano
# Script to upgrade an REE installation on a hot server and maintain sane directory names
if [ "$(whoami)" != "root" ]; then
echo "You need to be root to run this!"
exit 2
You can’t perform that action at this time.