Skip to content

Instantly share code, notes, and snippets.

//var urlLink = window.location.href;
var urlLink = $('#slash2').attr('href');
var lastIndex = urlLink.substring(urlLink.lastIndexOf("/") + 1, urlLink.length);
var lastIndexSplit = lastIndex.split("+");
if(lastIndexSplit.length == 1){
alert(lastIndexSplit);
}else{
alert('fail');
}
@guizmo
guizmo / dabblet.css
Created January 9, 2012 23:58
Untitled
function revesdo_form_alter(&$form, $form_state, $form_id) {
if($form['#id'] == 'views-exposed-form-spas-presentation-page') {
foreach ($form as $key => $formField) {
if(isset($formField['min']) && is_array($formField['min'])){
$min = $formField['min']['#default_value'];
$max = $formField['max']['#default_value'];
$form[$key]['min']['#title'] = $form[$key]['min']['#default_value'];
@guizmo
guizmo / dabblet.css
Created March 2, 2012 01:58
text indenting
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
display:block;
width:100px;
height:30px;
padding:20px;
background: red;
}
@guizmo
guizmo / index.html
Created March 15, 2012 09:16
HTML5 shell
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled</title>
</head>
<body>
</body>
</html>
@guizmo
guizmo / gist:2052246
Created March 16, 2012 19:58 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@guizmo
guizmo / hide-text.css
Created March 19, 2012 05:45
Image replacement
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@guizmo
guizmo / font-stack.css
Created March 27, 2012 09:01
Font stack
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
@guizmo
guizmo / hide-text.css
Created April 1, 2012 06:58
Image replacement
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
display: block;
}
@guizmo
guizmo / animate.css
Created April 5, 2012 20:23
animations width and height
.main{
width:800px;
display:inline-block;
}
.sidebar{
width:300px;
display:inline-block;
}
@guizmo
guizmo / media-queries-boilerplate.css
Created April 5, 2012 20:24
Media queries Boilerplate
/*Smartphones (portrait and landscape) ———– */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ———– */
@media only screen
and (min-width : 321px) {