Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Erik Evenson ErikEvenson

🎯
Focusing
Block or report user

Report or block ErikEvenson

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
View gist:e55439740f44d8ef590e41877e976732
2019/04/19 12:21:26 [INFO] Packer version: 1.4.0
2019/04/19 12:21:26 Packer Target OS/Arch: darwin amd64
2019/04/19 12:21:26 Built with Go Version: go1.12.4
2019/04/19 12:21:26 Detected home directory from env var: /Users/eevenson
2019/04/19 12:21:26 Using internal plugin for alicloud-ecs
2019/04/19 12:21:26 Using internal plugin for cloudstack
2019/04/19 12:21:26 Using internal plugin for hcloud
2019/04/19 12:21:26 Using internal plugin for hyperv-vmcx
2019/04/19 12:21:26 Using internal plugin for oracle-classic
2019/04/19 12:21:26 Using internal plugin for virtualbox-ovf
View Vagrantfile
# This configuration will set up a database (db) and a web server (web) VM.
# Assumes the use of VirtualBox 4.3.14-95030 as a provider.
# Uses vagrant-vbguest plugin (https://github.com/dotless-de/vagrant-vbguest)
# to keep VirtualBox Guest Addition wrangled.
# Configuration
# Machine-specific configuration
DB_INSTALL_SCRIPT = "vagrant_data/db/install.sh"
View Vagrantfile
Vagrant.configure("2") do |config|
# Use Ubuntu 12.04 64-bit for now.
config.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
# Provision the VM
config.vm.provision :shell, :path => "vagrant_data/install.sh"
# Configure network
config.vm.network :private_network, ip: "192.168.50.4"
@ErikEvenson
ErikEvenson / overloaded_test.py
Created Apr 24, 2013
Supports http://south.aeracode.org/ticket/958. Add this as myapp/management/commands/overloaded_test.py to your project.
View overloaded_test.py
from django.core.management.commands import test
from south.management.commands import patch_for_test_db_setup
from django.test.utils import get_runner
from django.conf import settings
TestRunner = get_runner(settings)
if hasattr(TestRunner, 'options'):
extra_options = TestRunner.options
else:
@ErikEvenson
ErikEvenson / snippet-1.coffee
Last active Nov 6, 2015
Case 180201201 - ERR_CONNECTION_RESET when PUTting to S3
View snippet-1.coffee
createCORSRequest: (method, url) ->
xhr = new XMLHttpRequest()
if xhr.withCredentials?
xhr.open method, url, true
else if typeof XDomainRequest != "undefined"
xhr = new XDomainRequest()
xhr.open method, url
else
xhr = null
@ErikEvenson
ErikEvenson / field.html
Created Nov 14, 2012 — forked from gerardo/field.html
Table-based formset rendering
View field.html
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
<div id="div_{{ field.auto_id }}" class="clearfix control-group{% if form_show_errors%}{% if field.errors %} error{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
{% comment %}
{% if field.label and not field|is_checkbox %}
<label for="{{ field.id_for_label }}" class="control-label {% if field.field.required %}requiredField{% endif %}">
View RKPathMatcher Test
- (void)testAddedTest
{
NSDictionary *arguments = nil;
RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/api/v1/organizations"];
BOOL isMatchingPattern = [pathMatcher matchesPath:@"/api/v1/organizations?name__icontains=t" tokenizeQueryStrings:YES parsedArguments:&arguments];
assertThatBool(isMatchingPattern, is(equalToBool(YES)));
assertThat(arguments, isNot(empty()));
assertThat(arguments, hasEntries(@"name__icontains", @"t",nil));
}
@ErikEvenson
ErikEvenson / .gitignore
Created Mar 12, 2011
Xcode 4 .gitignore file
View .gitignore
.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
View e2e.txt
Running "protractor:chrome" (protractor) task
Warning: chromeOnly is deprecated. Use directConnect
Using ChromeDriver directly...
Failed to load c++ bson extension, using pure JS version
Express server listening on 9000, in test mode
[undefined:undefined] CONNECTED
F
Failures:
@ErikEvenson
ErikEvenson / Gruntfile.js
Created Sep 4, 2014
Gruntfile.js with generator-webapp and assemble
View Gruntfile.js
// Generated on 2014-09-03 using
// generator-webapp 0.5.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// If you want to recursively match all subfolders, use:
// 'test/spec/**/*.js'
You can’t perform that action at this time.