Skip to content

Instantly share code, notes, and snippets.

@dannguyen
dannguyen / wget-snapshotpage.md
Last active December 25, 2023 20:57
Use wget to snapshot a page and its necessary visual dependencies

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.

@potench
potench / model.js
Last active December 10, 2015 19:18
Creating a Model using a grunt task
// Save to: `robyn/tasks/model.js`
// Run with: `grunt model:NameofModel`
module.exports = function (grunt) {
var requirejs = require('requirejs'),
fs = require("fs"),
wrench = require("wrench"),
path = require("path"),
scope = path.join("project", "static", "js"),
@potench
potench / gist:2960870
Created June 20, 2012 16:45
Review of TXJS 2012

Front-end Meeting June 20 2012

Agenda

  • Summer Schedules
  • show current resource board from Donna
  • not everyone has been updated on their upcoming projects - get feedback and make changes where appropriate
  • support / developer roles and levels
  • TXJS review
  • Taka and James present Ford Mustang Customizer
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@dannygarcia
dannygarcia / example.markdown
Created February 9, 2012 18:32
Normalizing Mouse Coordinates

Normalizing Input Coordinates

Constants

x = Input X or Y Position
w = Context X or Y Width

Left-to-right

0 ==========0.5========== +1

@doctyper
doctyper / _loading-indicator.scss
Created June 26, 2011 18:42
Jordan Dobson's Loading Indicator
// Jordan Dobson's Loading Indicator
// Development, design, HTML and CSS by Jordan Dobson
// http://jordandobson.tumblr.com/post/905003090/resizable-animated-loading-indicator
// Loader width/height
$spin-size: 40px !default;
// Pick a color and set the alpha value to 1
$spin-color: #fff !default;