Skip to content

Instantly share code, notes, and snippets.

View cymen's full-sized avatar

Cymen Vig cymen

  • Vig Consulting, LLC
  • Remote
View GitHub Profile
<%
# Build the helper file
# assumes config.assets.paths << Rails.root.join('tmp', 'teaspoon', 'assets') in development.rb
tmp_assets = Rails.root.join("tmp/teaspoon/assets")
spec_helper = File.join(tmp_assets, "spec_helper.js")
FileUtils.mkdir_p(File.dirname(spec_helper)) unless File.directory?(File.dirname(spec_helper))
specs = @suite.spec_assets(false).map{ |s| "#{s.gsub(/\.js.*$/, "")}" }
~/dev/teespring/rails-teespring cvig (cv/do-not-change-product-pricing-when-admin-revising)$ gm
GraphicsMagick 1.3.19 2013-12-31 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2013 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm command [options ...]
Where commands include:
batch - issue multiple commands in interactive or batch mode
benchmark - benchmark one of the other commands
! function(n) {
! function(n) {
function t(n, t) {
return Object.prototype.hasOwnProperty.call(n, t)
}
function e(n) {
return "undefined" == typeof n
}
var r = {},
@cymen
cymen / gist:11300440
Created April 25, 2014 19:31
CORS: Getty Connect API and jQuery POST SearchForImages example
$.ajax({
url: 'https://connect.gettyimages.com/v2/search/SearchForImages',
type: 'POST',
crossDomain: true,
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify({
RequestHeader: {
Token: '__YOUR_TOKEN_HERE__'
},
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.iPanel=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];r
@cymen
cymen / example_spec.js.coffee
Created October 11, 2012 21:19 — forked from jfirebaugh/example_spec.js.coffee
Auto-restoring sinon fakes with Konacha
# require spec_helper
Test =
fn: -> 'result'
it 'auto-resets sinon fakes', ->
@stub(Test, 'fn')
Test.fn()
Test.fn.should.have.been.called
; Abit Airpace
%ATHR.DeviceDesc.3067%              = ATHR_DEV_001C.ndi,        PCI\VEN_168C&DEV=001C&SUBSYS_1033147B
#!/usr/bin/php -q
<?php
$list = shell_exec("gem list");
foreach (split("\n", $list) as $line)
{
$entries = split(" ", $line);
$program = $entries[0];
Mapper.Reset(); // don't want some other area's usage polluting us
// create some mappings here that we don't want to pollute other areas
...
Mapper.Reset();
Mapper.CreateMap<Person, Person>();
anotherPerson.BrainSize = 5000;
var einstein = Mapper.Map<Person, Person>(anotherPerson);