Skip to content

Instantly share code, notes, and snippets.

View Jpunt's full-sized avatar

Jasper Haggenburg Jpunt

View GitHub Profile
require 'rubygems'
if ENV['CODECLIMATE_REPO_TOKEN']
require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
else
require 'simplecov' unless File.exists? '.zeus.sock'
end
ENV['RAILS_ENV'] = 'test'
@Jpunt
Jpunt / grid-basic.css
Last active August 29, 2015 14:01
T1000 examples
@media only screen and (max-width: 399px) {
.row { padding: 8px; }
.col { padding: 8px; }
.s-1 { width: 8.33333%; }
.s-2 { width: 16.66667%; }
.s-3 { width: 25%; }
.s-4 { width: 33.33333%; }
.s-5 { width: 41.66667%; }
.s-6 { width: 50%; }
@Jpunt
Jpunt / phantom-and-jasmine.spec.js
Last active August 29, 2015 14:04
Functional test with Node, Phantom and Jasmine
// npm install phantom
// npm install jasmine-node
// ./node_modules/jasmine-node/bin/jasmine-node phantom-and-jasmine.spec.js
var phantom = require('phantom');
describe("A suite", function() {
it("should open google.com", function(done) {
phantom.create(function(ph) {
ph.createPage(function(page) {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TestConsoleTheme</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TestConsoleTheme</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
/*global $ */
/*
_______ _______ _______ _______ _______ _______ _______ ___ _
| || _ || || || _ || || || | | |
| ___|| |_| || || ___|| |_| || _ || _ || |_| |
| |___ | || || |___ | || | | || | | || _|
| ___|| || _|| ___|| _ | | |_| || |_| || |_
| | | _ || |_ | |___ | |_| || || || _ |
@Jpunt
Jpunt / jquery.animate.js
Last active December 18, 2015 04:49
Patch for $.animate to use $.transit when possible, and provide fallbacks for things like translateX/Y.
/*globals $ */
/*
* Patches the jQuery-animate method to use CSS-transitions when possible.
*
* - Depends on $.transit: http://ricostacruz.com/jquery.transit/
* - Degrades gracefully to the original method when transitions aren't supported.
* - Provides fallbacks for translateX/Y's, so { x:10, y:10 } (very smooth) will become { top:10, left:10 } (less smooth) for less capable browsers.
* - 3d-transforms could be enabled with enable3d:true. Example: { x:100, enable3d:true }
* - Transitions could be disabled with enableTransitions:false. Example: { x:100, enableTransitions:false }
@Jpunt
Jpunt / gist:6670095
Created September 23, 2013 13:03
Grid-system als CSS
<section class="results-container">
<div class="result-count">
<p class="block-left bg-light padding">
@if(this.Model.SearchResult.Results.Any())
{
@Html.T(this.Model.SearchResult.Total, "{0} object gevonden", "{0} objecten gevonden", "Found {0} work of art", "Found {0} works of art", this.Model.SearchResult.Total)</p>
}
else
{
@Jpunt
Jpunt / gist:6670103
Created September 23, 2013 13:04
Grid-system als OOCSS
<section class="row">
<div class="col all-full">
<p class="block-left bg-light padding">
@if(this.Model.SearchResult.Results.Any())
{
@Html.T(this.Model.SearchResult.Total, "{0} object gevonden", "{0} objecten gevonden", "Found {0} work of art", "Found {0} works of art", this.Model.SearchResult.Total)</p>
}
else
{
@Html.T("Geen resultaten", "No results")
/*global $ */
/*
_______ _______ _______ _______ _______ _______ _______ ___ _
| || _ || || || _ || || || | | |
| ___|| |_| || || ___|| |_| || _ || _ || |_| |
| |___ | || || |___ | || | | || | | || _|
| ___|| || _|| ___|| _ | | |_| || |_| || |_
| | | _ || |_ | |___ | |_| || || || _ |