Skip to content

Instantly share code, notes, and snippets.

@savage69kr
savage69kr / gist:1344881
Created November 7, 2011 13:06 — forked from mikeyk/gist:1329319
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
@savage69kr
savage69kr / LICENSE.txt
Created November 29, 2011 13:24 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@savage69kr
savage69kr / hack.sh
Created April 17, 2012 12:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
if (typeof (AC) === "undefined") {
AC = {}
}
AC.ImageReplacer = Class.create({
_defaultOptions: {
listenToSwapView: true,
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i,
filenameInsert: "_☃x",
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i,
attribute: "data-hires",
@savage69kr
savage69kr / browserdetect.js
Created April 17, 2012 12:51 — forked from grigs/browserdetect.js
Apple's Browser Detection Script - prettified from http://images.apple.com/global/scripts/browserdetect.js
if (typeof (AC) === "undefined") {
AC = {}
}
AC.Detector = {
getAgent: function () {
return navigator.userAgent.toLowerCase()
},
isMac: function (c) {
var d = c || this.getAgent();
return !!d.match(/mac/i)
@savage69kr
savage69kr / discuss_simpler_narcissus.css
Created April 20, 2012 14:50 — forked from machal/discuss_simpler_narcissus.css
Simpler style for Disqus theme "Narcissus"
/* ------------------------------------------------------------------------------
Simpler style for Disqus theme "Narcissus"
Use it in your website stylesheet or add to Disqus
(Settings > Customize > Custom CSS).
Author: Martin Michalek, michalek@shortcat.cz, www.vzhurudolu.cz
------------------------------------------------------------------------------ */
@savage69kr
savage69kr / disqus-comment-count
Created April 20, 2012 14:52 — forked from jonathanmoore/disqus-comment-count
Updated Disqus comment count
{block:IfDisqusUsername}
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Username}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
@savage69kr
savage69kr / my_tumblr_description.html
Created April 20, 2012 14:55 — forked from syoichi/my_tumblr_description.html
現在Tumblrで使用しているThemeとDescriptionのソース。公式のLetterheadに手を入れたもの。他のTumblrのソースを参考にした箇所が多数ある。一応hAtomに対応させてあるつもり。ユーザ名に依存している部分やおかしなところを修正しシンプルにしていきたい。落ち着いたらTumblr上でも公開したい。
<br><b>Tumblr Number:458209</b>
<br><b>Tumblr ID:lyatJlnob</b>
<br>
<br><b>Tools</b>
<br><a href="http://mozilla.jp/firefox/">Firefox</a>
<br><a href="https://github.com/to/tombloo/wiki/">Tombloo</a>
<br><a href="https://addons.mozilla.org/ja/firefox/addon/greasemonkey/">Greasemonkey</a>
<br><a href="http://userscripts.org/scripts/show/59330">Tumblr Life</a>
<br><a href="http://luft2501.chicappa.jp/blog/?eid=99">CursedTumblr</a>
@savage69kr
savage69kr / disqus.css
Created April 20, 2012 14:55 — forked from sajithdilshan/disqus.css
disqus css theme
#dsq-global-toolbar
.dsq-clearfix {
display: none;
}
#dsq-comments-title h3 {
}
#disqus_thread {
width: 730px !important;
@savage69kr
savage69kr / minimalist_plus_disqus
Created April 20, 2012 14:55 — forked from andrewfulton/minimalist_plus_disqus
Tumblr's minimalist theme WITH a disqus block
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Theme: The Minimalist v1.
Design: The Minimalist (http://minimalist.co)
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>