Skip to content

Instantly share code, notes, and snippets.

Boaz boazsender

Block or report user

Report or block boazsender

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@boazsender
boazsender / vgg_full_scrape.sh
Last active Jan 15, 2018
The first of each identity in the VGG face dataset.
View vgg_full_scrape.sh
#!/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 Aug 30, 2012 — forked from tbranyen/backbone.collectioncache.js
Backbone.Collection caching by URL
View backbone.cache.js
/*!
* 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;
View sample-backbone.routefilter-router.js
/*
* 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": [{
View mobilecheckbox.css
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 Feb 21, 2012
Example gruntfile.
View grunt.js
/*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 Feb 20, 2012
Command line and JavaScript examples for grunt blog post.
View grunt-jquery-init-template-output.sh
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)
View 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; }
View 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; }
@boazsender
boazsender / webserver.js
Created Nov 18, 2011
Simple Node Webserver
View webserver.js
/*
This is a slightly tweaked version of
https://github.com/nhira/node-simple-webserver/blob/master/webserver.js
*/
var sys = require("sys"),
http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs");
View keyboard-event-trigger.js
/*
Chrome does not let you modify the keyCode prop when you trigger it, so it defaults to 0.
You can use this code to trigger a keydown with a char code of 0 in chrome.
If you use initKeyEvent instead of initKeyboardEvent, it will work in FF
(the bellow example would trigger keydown with a char code of 65 in FF).
*/
document.addEventListener( 'keydown', function( event ){
console.log( event.keyCode )
You can’t perform that action at this time.