Skip to content

Instantly share code, notes, and snippets.

View timelyportfolio's full-sized avatar

timelyportfolio timelyportfolio

View GitHub Profile
@rondevera
rondevera / css-to-select-range-of-children.html
Last active February 8, 2023 11:29
CSS selector for a range of children
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}
@RandomEtc
RandomEtc / yql-csv.html
Created July 27, 2010 06:12
load csv files from anywhere using YQL
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
url: 'http://query.yahooapis.com/v1/public/yql',
data: {
q: "select * from csv where url='http://www.tom-carden.co.uk/p5/tube_map_travel_times/data/lines2.csv' and columns='station1,station2,line,time'",
format: 'json'
@nickfloyd
nickfloyd / create_branch_from_tag
Created January 27, 2011 05:38
To create a branch from a tag
-Go to the starting point of the project
>> git checkout origin master
-fetch all objects
>> git fetch origin
-Make the branch from the tag
>> git branch new_branch tag_name
-Checkout the branch
>> git checkout new_branch
-Push the branch up
>> git push origin new_branch
@mbostock
mbostock / .block
Last active February 8, 2016 23:43
Grouped Bar Chart
license: gpl-3.0
@jonleighton
jonleighton / base64ArrayBuffer.js
Last active April 19, 2024 21:54
Encode an ArrayBuffer as a base64 string
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then
// use window.btoa' step. According to my tests, this appears to be a faster approach:
// http://jsperf.com/encoding-xhr-image-data/5
/*
MIT LICENSE
Copyright 2011 Jon Leighton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mbostock
mbostock / .block
Last active February 26, 2019 22:38
Marimekko Chart
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-marimekko-chart
@mbostock
mbostock / .block
Last active March 5, 2019 23:09
Zoomable Icicle
license: gpl-3.0
redirect: https://observablehq.com/@d3/zoomable-icicle
@mbostock
mbostock / .block
Last active January 3, 2024 15:40
Superformula Tweening
license: gpl-3.0
@mbostock
mbostock / .block
Last active March 7, 2024 22:20
Collapsible Force Layout
license: gpl-3.0