This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fragmention(self, bookmark): | |
# Normalize whitespace and encode text as UTF8 | |
text = ' '.join(self.text.split()).encode('utf-8') | |
url_parts = urlparse(bookmark.url) | |
# If the URL has no path (i.e. http://google.com) add a "/" then append fragmention | |
formatter = '%s/##%s' if not len(url_parts.path) else '%s##%s' | |
fragmention_url = formatter % (url_parts.geturl(), urllib.quote_plus(text)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
use strict; | |
use warnings; | |
use URI::Escape qw(uri_escape_utf8); | |
use open IO => ":utf8", # UTF8 by default | |
":std"; # Apply to STDIN/STDOUT/STDERR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After spending the better part of the month implementing date support | |
in RethinkDB, Mike Lucy sent the team the following e-mail. It would | |
have been funny, if it didn't cause thousands of programmers so much | |
pain. Read it, laugh, and weep! | |
----- | |
So, it turns out that we're only going to support dates between the | |
year 1400 and the year 10000 (inclusive), because that's what boost | |
supports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- | |
// Sass (v3.2.9) | |
// --- | |
@mixin respond-to($queries...) { | |
$length: length($queries); | |
@for $i from 1 through $length{ | |
@if $i % 2 == 1 { | |
@media screen and (min-width: nth($queries, $i)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------------------- | |
SIMPLENOTE IN YOUR MENUBAR / FLUID.APP USERSTYLES | |
Than Tibbetts | |
http://thanland.com/notes/put-simplenote-in-your-menubar-with-fluid | |
------------------------------------------------- */ | |
.wrapper { | |
top: 20px !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// Simple, single configuration file to override almost all paths and server settings. As used by @airways | |
// and @litzinger. | |
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that | |
// local users and each instance (staging, production) can have their own settings. | |
// These config files are mainly meant to be used on a shared development server used by all developers, | |
// although it works almost as well for local development as well. |