Skip to content

Instantly share code, notes, and snippets.

Jeffrey Carpenter i8degrees

Block or report user

Report or block i8degrees

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
@kylebarrow
kylebarrow / example.html
Created Jun 23, 2011
Prevent links in standalone web apps opening Mobile Safari
View example.html
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
View skel.rb
#!/usr/bin/env ruby
#
# ~/Projects/homnom/nomnom-v0.2/tmp/cmdline-args.rb:jeff
#
# Preliminary play with a new input arguments parser for much enhanced
# console-level control of our I/O scripts.
#
# Usage:
#
# http://ruby-doc.org/stdlib-1.9.3/libdoc/optparse/rdoc/OptionParser.html
@i8degrees
i8degrees / github_feed
Created Apr 22, 2012
GitHub Feed for i8degrees
View github_feed
#!/bin/sh
#
# Github Feed for i8degrees
#
URL="https://github.com/i8degrees.atom"
if [ $# -eq 1 ] ; then
headarg=$(( $1 * 2 ))
else
View .htaccess
SetOutputFilter DEFLATE
@eric-hu
eric-hu / Open iterm tab here
Last active Oct 22, 2019
Apple script to open an iterm2 tab from right-clicking on a file or folder in Finder. To use: (1) Open Automator (2) Create a new service (3) Change "Service receives selected" drop downs to "Files or folders" in "Finder" (4) Select "Run applescript" from the sidebar, then paste this script in and save
View Open iterm tab here
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer:
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active Oct 15, 2019
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@deepak1556
deepak1556 / webp2png.js
Created Dec 7, 2013
webp support using libwebpjs (webp->png in canvas)
View webp2png.js
WebPDecodeAndDraw = function (data) {
var decoder = new WebPDecoder();
var bitmap = decoder.WebPDecode(data, data.length);
if (bitmap) {
//Draw Image
var output = ctx.createImageData(canvas.width, canvas.height);
var biWidth = canvas.width;
var outputData = output.data;
@i8degrees
i8degrees / nomdev.sublime-build
Last active Dec 31, 2015
Sublime Text 2 Build System for nomdev.rb
View nomdev.sublime-build
{
// nomdev.rb expects and needs to be executed from a project's root directory
"working_dir": "${project_path}",
// At the bare minimum, we need the executable paths to:
// a) Ruby v1.9.x interpreter; b) nomdev.rb; c) CMake v2.6.x+;
// d) build tools (make, clang, etc.)
"path": "${HOME}/Projects/nomdev.git:${HOME}/local/bin:/usr/local/bin:/usr/bin",
// Default build (Command + B)
"cmd": [ "nomdev.rb build --threads 6; nomdev.rb install" ],
// We need shell access in order to execute our build
@soarez
soarez / ca.md
Last active Oct 22, 2019
How to setup your own CA with OpenSSL
View ca.md

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@cletusw
cletusw / .eslintrc
Last active Oct 20, 2019
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
View .eslintrc
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
You can’t perform that action at this time.