Skip to content

Instantly share code, notes, and snippets.

View ludviglindblom's full-sized avatar

Ludvig Lindblom ludviglindblom

View GitHub Profile
@satya164
satya164 / quantity-query.scss
Last active September 7, 2023 20:06
Quantity Queries in Sass
@mixin quantity-query($selector, $type, $amount, $max: null) {
@if $type == at-least {
#{$selector}:nth-last-child(n+#{$amount}),
#{$selector}:nth-last-child(n+#{$amount}) ~ #{$selector} { @content; }
} @else if $type == at-most {
#{$selector}:nth-last-child(-n+#{$amount}):first-child,
#{$selector}:nth-last-child(-n+#{$amount}):first-child ~ #{$selector} { @content; }
} @else if $type == between {
@if type-of($max) != "number" {
@error "Max value must be a number for quantity-query.";
@scottjehl
scottjehl / fixorientationzoom.js
Created January 6, 2012 00:27
Fix iOS Orientation Change Zoom Bug
/*
NOTE!!!!
The most updated version of this code is here:
https://github.com/scottjehl/iOS-Orientationchange-Fix
@rauchg
rauchg / ms.md
Created December 21, 2011 00:25
Milliseconds conversion utility.
@ThisIsMissEm
ThisIsMissEm / gist:1496059
Created December 19, 2011 08:21
Least amount of code to get a playable spotify album cover within the context of a spotify app. Suggestions welcome.
var m = sp.require("sp://import/scripts/api/models"),
v = sp.require("sp://import/scripts/api/views"),
dom = sp.require('sp://import/scripts/dom');
var someContainer = dom.queryOne('.someClass');
m.Album.fromURI("spotify:album:2d7CiSgCNMiSjE9UG3sdTX", function(context){
var player = new v.Player();
player.context = context;
dom.adopt(someContainer, player.node);
@plamere
plamere / index.html
Created December 6, 2011 13:45
Demonstration of how to call the Echo Nest API from a Spotify App
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Playlister</title>
<link rel="stylesheet" href="sp://import/css/adam.css">
<link rel="stylesheet" href="styles.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
@liesen
liesen / SpotifyViewsDemo.html
Created December 1, 2011 16:38
Spotify Apps API example
<!DOCTYPE html>
<html>
<head>
<title>API</title>
<link rel="stylesheet" href="sp://import/css/adam.css">
<style>
body {
-webkit-box-orient: vertical;
display: -webkit-box;
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.