Skip to content

Instantly share code, notes, and snippets.

h2
{
/*text-shadow: -1px -1px -1px @white;*/
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
font-size: 2.5em;
border-bottom: 1px @gray solid;
margin-bottom: .5em;
}
p
@zischwartz
zischwartz / index.html
Created March 31, 2015 12:42
ScriptEd Unit 7 Project: Hi- Lo // source http://jsbin.com/lejewepeyo
<!DOCTYPE html>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/highlow.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="js/guts.js"></script>
<script src="js/highlow.js"></script>
<title>ScriptEd Unit 7 Project: Hi- Lo</title>
<style id="jsbin-css">
@zischwartz
zischwartz / gist:00fa4a0104e2a9919524
Last active September 14, 2015 20:30
Notebook websocket error
[I 20:29:05.985 NotebookApp] Writing notebook server cookie secret to /root/.ipython/profile_default/security/notebook_cookie_secret
[I 20:29:05.986 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[W 20:29:06.012 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[W 20:29:06.013 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
[I 20:29:06.019 NotebookApp] Serving notebooks from local directory: /notebooks
[I 20:29:06.019 NotebookApp] 0 active kernels
[I 20:29:06.019 NotebookApp] The IPython Notebook is running at: http://[all ip addresses on your system]:8888/user/G7Dqldp5KZwe/
[I 20:29:06.019 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 20:29:06.480 NotebookApp] 302 GET /user/G7Dqldp5KZwe (172.17.42.1) 2.75ms
[I 20:29:16.628 NotebookApp
@zischwartz
zischwartz / rgb_to_lab.swift
Created March 23, 2016 19:54
Convert RGB to L*ab color space in Swift
//http://stackoverflow.com/a/24201042/83859
infix operator ^^ { }
func ^^ (radix: Double, power: Double) -> Double {
return Double(pow(Double(radix), Double(power)))
}
//Based on https://github.com/d3/d3-color/blob/master/src/lab.js
function make_graph(data){
var svg = d3.select("svg")
// hackily just remove everything from last time.
// a more sophisticated version would transition nicely
svg.selectAll("*").remove()
var margin = {top: 20, right: 20, bottom: 30, left: 40},
width = +svg.attr("width") - margin.left - margin.right,
height = +svg.attr("height") - margin.top - margin.bottom;
@zischwartz
zischwartz / .block
Created November 13, 2017 20:47
Circle Dragging I
license: gpl-3.0
@zischwartz
zischwartz / .block
Created November 15, 2017 14:17
Local Variables
license: mit
@zischwartz
zischwartz / .block
Created December 13, 2017 17:21
fresh block
license: mit
@zischwartz
zischwartz / .block
Last active January 30, 2018 16:18
d3 raise()/order problem
license: mit
let cards = [0,1,2,3,4]