Skip to content

Instantly share code, notes, and snippets.

View dlewand691's full-sized avatar

Daniel Lewandowski dlewand691

View GitHub Profile
@richardmackney
richardmackney / Instagram RSS Image Feed
Created March 11, 2011 12:34
Display Instagram images using jquery.zRSSFeed via Google Feed API. Made for iframes (Posterous) - images open in new window.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
/**
* Plugin: jquery.zRSSFeed
*
@airways
airways / 1 dist.config.php
Created November 1, 2011 00:44
Simple, single ExpressionEngine configuration file to override almost all paths and server settings. As used by @airways and @litzinger.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Simple, single configuration file to override almost all paths and server settings. As used by @airways
// and @litzinger.
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that
// local users and each instance (staging, production) can have their own settings.
// These config files are mainly meant to be used on a shared development server used by all developers,
// although it works almost as well for local development as well.
@saetia
saetia / gist:1623487
Last active April 20, 2025 23:05
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@dlferro
dlferro / gist:3004639
Created June 27, 2012 15:00
Leaflet Image Deepzoom
<html>
<head>
<link rel="stylesheet" href="lib/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="lib/leaflet.ie.css" />
<![endif]-->
</head>
<body>
<div id="map" style="width:1004px; height:748px; border: 1px solid black;"></div>
<script type="text/javascript" src="lib/leaflet-src.js"></script>
@terkel
terkel / _decimal.scss
Last active March 18, 2025 11:17
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
@jareware
jareware / SCSS.md
Last active April 11, 2025 18:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@MikeAM
MikeAM / baseline-grid.scss
Last active May 12, 2017 17:58
Pure-CSS baseline grid with easily-customizable column count and baseline size (using Sass). No more uploading background images!
/* Sass Mixin that generates a Baseline Grid */
/* by: Mike Morrison, Soholaunch.com */
/* You don't have to leave this credit comment in, but it would be nice of you. */
// Set your grid dimensions here
$body-width: 960px;
$baseline: 22px;
@mixin baseline-grid {
$columns: 16;
$column-color: rgba(200,0,0,.2);
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active March 12, 2025 01:22
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@agarciadom
agarciadom / dropdown.js
Last active August 5, 2020 08:45
LocalStorage-based dropdown menus with raw JavaScript. The shown/hidden menu state is preserved across loads. By default, everything is shown, and the page also degrades gracefully when JS is disabled. (Look 'ma, no JQuery!)
/*
Simple example of a dropdown menu using HTML5 LocalStorage.
*/
function create_dropdown(menu_id, category_title_class) {
var menu = document.getElementById(menu_id)
var ctitles = menu.getElementsByClassName('category_title')
for (var i = 0; i < ctitles.length; i++) {
var ctitle = ctitles[i]
apply_shown(ctitle, is_shown(ctitle))
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.