Skip to content

Instantly share code, notes, and snippets.

Copyright (c) 2011 ZURB, http://www.zurb.com/
@ronlobo
ronlobo / c5 permission
Created August 5, 2013 03:44
concrete5 permission programatically
$speakersPE = GroupPermissionAccessEntity::getOrCreate($speakers);
$speakersPEID = $speakersPE->getAccessEntityID();
$adminsPE = GroupPermissionAccessEntity::getOrCreate($admins);
$adminsPEID = $adminsPE->getAccessEntityID();
$suPE = UserPermissionAccessEntity::getOrCreate($suUI);
$suPEID = $suPE->getAccessEntityID();
$manageSessionsEntities = array($speakersPE, $adminsPE, $suPE);
$pk = SitemapPermissionKey::getByHandle('access_sitemap');
// variable to hold request
var request;
// bind to the submit event of our form
$("#foo").submit(function(event){
// abort any pending request
if (request) {
request.abort();
}
// setup some local variables
var $form = $(this);
@ronlobo
ronlobo / header.html
Created September 5, 2013 09:56
The configured meta tag for no zoom
<meta name="viewport"
content="
height = device-height,
width = device-width,
initial-scale = 1.0,
minimum-scale = 1.0,
maximum-scale = 1.0,
user-scalable = no,
target-densitydpi = device-dpi
" />
@ronlobo
ronlobo / new_gist_file
Created September 20, 2013 07:38
Check for contenteditable input and collapsable and resize nice scroll
$('#content').find('.collapse').on('shown', function() {
$("#content").getNiceScroll()[0].resize();
});
$('#content').find('.redactor_editor').on('input', function() {
$("#content").getNiceScroll()[0].resize();
});
@ronlobo
ronlobo / nav.css
Created October 2, 2013 09:38
Justified Navigation
ul {
margin: 0;
padding: 0;
list-style-type: none;
text-align: justify;
}
ul:after {
content: "";
width: 100%;
@ronlobo
ronlobo / styled_select.css
Created November 27, 2013 13:36
HTML Select styling
.select-bg {
position: relative;
display: inline-block;
}
select {
display: inline-block;
padding: 4px 3px 5px 5px;
width: 150px;
outline: none;

An Anonymous Pen

Recreated http://imgur.com/GqdaY5F in one element. I don't take credit for the original (nor do I know where it's from)

There are some pretty cool tricks I came up with in order to do so:

All of the big rings are done using box shadows, as are three of the small circles

One of the small circles is done using :before, the other rotating counter clockwise is :before's box shadow

@ronlobo
ronlobo / countries.sql
Created January 20, 2014 13:58
Countries sql script
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Jeu 04 Mars 2010 à 12:12
-- Version du serveur: 5.1.36
-- Version de PHP: 5.3.0
-- Autor : Thomas Tourlourat (thomas@tourlourat.com)