Skip to content

Instantly share code, notes, and snippets.

View qrush's full-sized avatar
🕸️
Making internets

Nick Quaranto qrush

🕸️
Making internets
View GitHub Profile
@guw
guw / .travis.yml
Last active June 14, 2018 10:49
Travis CI with Heroku CLI
# use containers in Travis (instead of VMs)
sudo: false
# install Heroku CLI
# (based on https://github.com/travis-ci/apt-package-whitelist/issues/375)
addons:
apt:
sources:
- heroku
packages:
@dteoh
dteoh / put_post_json_rails_5_integration_test.md
Created July 12, 2016 07:33
PUT or POST JSON in a Rails 5 ActionDispatch::IntegrationTest

In Rails 5, the preferred base class for testing controllers is ActionDispatch::IntegrationTest.

If you have an API that receives parameters as JSON request bodies, here are some helper methods to facilitate testing:

class ActionDispatch::IntegrationTest
  def put_json(path, obj)
    put path, params: obj.to_json, headers: { 'CONTENT_TYPE' => 'application/json' }
  end
@emilyst
emilyst / fairyfloss.vim
Created May 13, 2016 05:47
A quick-and-dirty automatic conversion of the Fairyfloss Sublime Text theme (http://sailorhg.github.io/fairyfloss/) to a Vim colorscheme using the coloration script (https://github.com/sickill/coloration).
" Vim color file
" Converted from Textmate theme Monokai using Coloration v0.4.0 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@jamtur01
jamtur01 / ladder.md
Last active November 23, 2025 07:13
Kickstarter Engineering Ladder
@pboling
pboling / PhantomJS Install.md
Last active July 23, 2019 17:54
How to install old PhantomJS 1.8.2 on Mac OS X
@maxivak
maxivak / readme.md
Last active November 10, 2024 12:19
sitemap.xml for Rails 4 application

Generate sitemap.xml in Rails app

This post shows how to make sitemap.xml for your web site. The sitemap will be accessible by URL http://mysite.com/sitemap.xml

Routes

Myrails::Application.routes.draw do
@steverichey
steverichey / Iconizer.sh
Last active February 19, 2026 04:20
Create iOS application icons from one PDF file. Requires ImageMagick.
#!/bin/sh
#
# Iconizer shell script by Steve Richey (srichey@floatlearning.com)
#
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file.
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject
#
# Requires ImageMagick: http://www.imagemagick.org/
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@bobspryn
bobspryn / preferredFontDescriptorWithTextStyle sizes and styles
Created December 11, 2013 01:12
Apple iOS7 sizes and traits for all UIFontTextStyle's and UIContentSizeCategory's
UIContentSizeCategoryExtraSmall
FontStyle: UICTFontTextStyleBody
Point size 14.000000
Family Name .AppleSystemUIBody
FontStyle: UICTFontTextStyleHeadline
Point size 14.000000
Family Name .AppleSystemUIHeadline
Bold
FontStyle: UICTFontTextStyleSubhead
Point size 12.000000
@DamonOehlman
DamonOehlman / README.md
Last active October 30, 2023 20:03
General WebRTC tips and tricks collated over time