Skip to content

Instantly share code, notes, and snippets.

View hejrobin's full-sized avatar
👠

Robin Grass hejrobin

👠
View GitHub Profile
(function(window, jQuery) {
/**
* ensure
*
* Only invokes callback if selector matches at least one node.
*
* @param string selector
* @param function callback
*
@hejrobin
hejrobin / Hyrulean-Rupees.markdown
Created May 10, 2014 10:44
A Pen by Robin Grass.
(function(y, o, d, a) {
var i = o.createElement(d);
i.scrolling = 'off'; i.frameborder = '0';
i.src = a; o.body.appendChild(i);
})(window, document, 'iframe', '//somedomain.tld');
{
"/": "DefaultController",
"foo": "DefaultController",
"user": {
":uri": "AccountController::getPerson",
[
{
"featureType": "all",
"elementType": "labels",
"stylers": [
{ "visibility": labelVisibility }
]
}, {
"featureType": "road",
"elementType": "geometry.fill",
# layout.html.erb
<div id="master">
<%= yield :person %>
<%= yield %>
</div>
# view.html.erb
<?php
class SampleController implements \Brewery\Application\Controller {
public function index() {}
public function error() {}
}
// requests kräver konfig i xml
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<?php
/**
* random_string
*
* Generates random string based on character pool and length.
*
* @param string $type Return string type.
* @param int $length Return string length.
*
* @return string
{
"file_exclude_patterns": [".DS_Store"],
"folder_exclude_patterns": [".svn", ".git"],
"ignored_packages": ["Vintage"],
"tab_size": 2,
"translate_tabs_to_spaces": false,
"highlight_line": true,