Skip to content

Instantly share code, notes, and snippets.

@boazsender
boazsender / nipon-colors.js
Created November 10, 2024 01:24
Nipon Colors
/*
From Nipon Colors (https://nipponcolors.com) CSS:
https://nipponcolors.com/min/g=nipponcolors_css
*/
const niponNames = {
NADESHIKO: "DC9FB4",
KOHBAI: "E16B8C",
SUOH: "8E354A",
TAIKOH: "F8C3CD",
IKKONZOME: "F4A7B9",
@boazsender
boazsender / index.html
Last active August 24, 2022 16:05
An example of a webpage rendering information from a google form as both a list and a map. Demo sheet is here: https://docs.google.com/spreadsheets/d/1l6FZYfeMx5nSz3diE60PeFrvJmJtC3_9W5BvhNhd7fA/edit?resourcekey#gid=64148024
<!DOCTYPE html>
<html lang="en">
<head>
<title> google form backed list and map</title>
<meta name="description" content="a google form backed map.">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="keywords" content="map">
<!-- included the leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"/>
@boazsender
boazsender / vgg_full_scrape.sh
Last active January 15, 2018 02:04
The first of each identity in the VGG face dataset.
#!/bin/bash
# Author: Boaz Sender
#
# Script for downloading all the good images in the VGG data set.
#
# VGG is available for download from www.robots.ox.ac.uk/~vgg/data/vgg_face/
#
# usage: from the root of a vgg_face_dataset download, run:
# mkdir full_scrape && ./vgg_full_scrape.sh
@boazsender
boazsender / backbone.cache.js
Created August 30, 2012 16:46 — forked from tbranyen/backbone.collectioncache.js
Backbone.Collection caching by URL
/*!
* backbone.cache.js v0.0.2
* Copyright 2012, Boaz Sender (@boazsender)
* Based on backbone.collectioncache.js by Tim Branyen (@tbranyen) (https://gist.github.com/gists/3532848/edit)
* backbone.cacher.js may be freely distributed under the MIT license.
*/
(function(window) {
// Dependencies
var Backbone = window.Backbone;
/*
* This code does not actually work, it is for demonstration purposes
* of a router using https://github.com/boazsender/backbone.routefilter
*/
// Imagine this came from the server into a big app wide state object
// (likely a Backbone.Model if we were actually doing this for real).
var data = {
// Here are my app's pages (it's content heavy app)
"pages": [{
@boazsender
boazsender / mobilecheckbox.css
Created August 30, 2012 04:34
Mobile CSS checkboxes
input[type=checkbox] {
outline: none;
width: 58px;
height: 23px;
font-size: 11px;
line-height: 2;
display: block;
font-weight: bold;
border-radius: 3px;
border: 1px solid #B9B9B9;
@boazsender
boazsender / grunt.js
Created February 21, 2012 00:07
Example gruntfile.
/*global config:true, task:true*/
config.init({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= template.today("m/d/yyyy") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
@boazsender
boazsender / grunt-jquery-init-template-output.sh
Created February 20, 2012 23:50
Command line and JavaScript examples for grunt blog post.
Please answer the following:
[?] Project name (Awesome)
[?] Project title (Awesome)
[?] Description (The best jQuery plugin ever.)
[?] Version (0.1.0)
[?] Project git repository (git://github.com/boazsender/Awesome.git)
[?] Project homepage (https://github.com/boazsender/Awesome)
[?] Project issues tracker (https://github.com/boazsender/Awesome/issues)
[?] Licenses (MIT)
[?] Author name (Boaz Sender)
@boazsender
boazsender / index.html
Last active September 30, 2015 15:08 — forked from iros/index.html
<!DOCTYPE html>
<html>
<head>
<title>Twitter Search Plugin</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="jquery.twitter.js"></script>
<style type="text/css">
body { padding: 10px; font-family: sans-serif; }
h2 { font-weight: normal; margin-top: 20px; clear: both; }
.twitter-posts li { margin-bottom: 10px; font-size: 12px; clear: both; list-style-type:none; }
@boazsender
boazsender / index.html
Created February 13, 2012 04:30 — forked from iros/index.html
<!DOCTYPE html>
<html>
<head>
<title>Twitter Search Plugin</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="https://github.com/boazsender/jQuery-Twitter-Plugin/blob/master/dist/jquery.twitter.js"></script>
<style type="text/css">
.twitter-posts li { margin-bottom: 10px; font-size: 12px; clear: both; list-style-type:none; }
.twitter-posts li img { float:left; width: 48px; margin:0px 10px 10px 0px;border:1px solid #c2c2c2; -moz-box-shadow: 0px 0px 4px #c2c2c2; -webkit-box-shadow: 0px 0px 4px #c2c2c2; box-shadow: 0px 0px 4px #c2c2c2; }
.twitter-posts li a { text-decoration:none; color: #009; }