Skip to content

Instantly share code, notes, and snippets.

View ronnyandre's full-sized avatar

Ronny-André Bendiksen ronnyandre

View GitHub Profile
@ronnyandre
ronnyandre / header.html
Created June 5, 2014 08:04
All Search and Social Media Meta Tags Starter Template
<!-- Search Engines / Google -->
<meta name="author" content="Wikipedia User">
<meta name="description" content="Telangana is a state in southern India. It was part of the princely state of Hyderabad (Medak and Warangal Divisions) which was ruled by the Nizams during the British Raj until 1947, and later until 1948, when it joined the Union of India.">
<!-- Social: Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@wikipedia">
<meta name="twitter:creator" content="wikipedia_user">
<meta name="twitter:title" content="Telangana">
<meta name="twitter:description" content="Telangana is a state in southern India. It was part of the princely state of Hyderabad (Medak and Warangal Divisions) which was ruled by the Nizams during the British Raj until 1947, and later until 1948, when it joined the Union of India.">
# Run this at your site root to upgrade EE
# Paths assume your system folder is at site root
# http://expressionengine.com/docs/installation/update.html
#!/bin/bash
# location of the release
RELEASE_PATH="/Users/ryan/Desktop/Incoming/ExpressionEngine1.6.7"
echo "Enter the name of your system folder"
@nathansmith
nathansmith / select_jump_list.js
Created August 13, 2010 04:09
Simple jQuery Jump List
$('select.jump_list').change(function() {
if (!this.value) {
return;
}
var url, url_len, last_char;
if (this.value.match('://')) {
window.top.location = this.value;
}
/* =IE7 & IE8 hax
---------------------------------------------- */
#heroku-header {
min-width/*\**/: 991px\9;
}
/* ------------------------------------------- */
@url2png
url2png / url2png-example-c-sharp
Created June 4, 2011 09:01
Example usage of url2png.com automated screenshot API
' VB.NET Example
' Supplied by Thomas Kristensen
Public Shared Function url2png(ByVal UrlToSite As String) As String
Dim url2pngAPIKey As String = "API_KEY"
Dim url2pngPrivateKey As String = "PRIVATE_KEY"
Dim url As String = HttpUtility.UrlEncode(UrlToSite)
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
@paulirish
paulirish / gist:526168
Created August 16, 2010 00:42 — forked from anonymous/>
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- According to Heather Champ, former community manager at flickr,
you should not allow search engines to index your "Contact Us"
@ryanflorence
ryanflorence / getCache.js
Created November 7, 2011 18:44
Cache data in the localStorage
var getCache = (function() {
var supportsLocalStorage = 'localStorage' in window;
// both functions return a promise, so no matter which function
// gets called inside getCache, you get the same API.
function getJSON(key) {
return jQuery.getJSON(key).then(function(data) {
localStorage.setItem(key, JSON.stringify(data));
}).promise();
}
@lukeholder
lukeholder / nav.twig
Last active June 20, 2018 16:53
nested navigation with in template variables.
{% set nav = [
{"href": "http://1.com", "name": "link1","sublinks":null},
{"href": "http://1.com", "name": "link2","sublinks":null},
{"href": "http://1.com", "name": "link3","sublinks":
[{"href": "http://1.com", "name": "link 3.11","sublinks":null},
{"href": "http://1.com", "name": "link 3.22","sublinks":
[{"href": "http://1.com", "name": "link 3.11","sublinks":null},
{"href": "http://1.com", "name": "link 3.22","sublinks":null}
]
}]
@davist11
davist11 / Fancy File Inputs.js
Created October 25, 2010 21:32
Fancy File Inputs
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {