Skip to content

Instantly share code, notes, and snippets.

@tsvensen
tsvensen / image-replacement.css
Last active December 23, 2019 11:46
Image Replacement Technique
/* http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
@fitnr
fitnr / address-splitter.js
Last active January 30, 2026 14:02
Split an address into number and street parts
// http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric/1830844#1830844
function isNumber(n) { return !isNaN(parseFloat(n)) && isFinite(n); }
// Check if character is a fraction, e.g. ¼
function isFractionalChar(n) {
c = n.charCodeAt();
return (c >= 188 && c <= 190) || (c >= 8531 && c <= 8542);
}
// return the first fractional character in a string
@tealtan
tealtan / instructions.md
Last active December 30, 2016 15:07
Custom Twitter stylesheet

Custom Twitter Stylesheet

Craig Mod does a bigger overhaul with Twitter for Minimalists, but this will only do the following:

  • Hides promoted tweets and trends
  • Hides the useless “Expand” link that appears under every tweet
  • Tones down the blue conversation line to a barely-visible gray
  • Hides all numbers

You can add this CSS in Safari with this extension. The URL to target is twitter.com/*.

@krusynth
krusynth / simpleXML_to_object.php
Created September 6, 2013 13:33
Translates a simpleXML object into a standard PHP object.
<?php
/*
* Translate a non-standard object into an associative array object.
* Super-useful for dealing with simplexml objects.
*/
function simpleXML_to_object($obj)
{
$data = new StdClass();
if(
(is_object($obj) && get_class($obj) == 'SimpleXMLElement')
@goldsmith
goldsmith / python_mavericks_guide.sh
Last active December 25, 2024 20:56
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.
@maxfenton
maxfenton / a-new-mac-setup.md
Last active April 17, 2024 10:55
System setup stuff for a new OLD mac (a/o 2020)

New computer setup

a/o 2020-05-29

--

Format the drive

  1. Restart with Cmd-R or Cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS
@reubeningber
reubeningber / TeuxDeux Snippet
Last active December 31, 2015 23:39
Assortment of Text Expander Snippets for the popular to do list app [TeuxDeux](http://teuxdeux.com)
Shortcode: htitle
Snippet: =========== **%fill:Header Title%** ===========
Result: =========== **Header** ===========
Shortcode: tline
Snippet: ==============================
Result: ==============================
Shortcode: startask
Snippet: **★ %fill:Starred To Do Item%**
@maxfenton
maxfenton / annotated-arcades.txt
Created January 18, 2014 18:53
Arcades reading
File: Benjamin_Arcades - annotated.pdf
Annotation summary:
--- Page 7 ---
Oval (blue), Mar 27, 2013, 12:28 PM
Oval (blue), Mar 27, 2013, 12:28 PM
anonymous
anonymous / An-Anonymous-Pen.markdown
Created February 19, 2014 18:34
A Pen by A Non Ymous.
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 25, 2025 20:12
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes: