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
import serpy | |
from drf_haystack.serializers import HaystackSerializer | |
from sorl.thumbnail import get_thumbnail | |
class SerpyThumbnailImageField(serpy.StrField): | |
""" | |
A Serpy Field class returning hyperlinked scaled and cached images. |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> |
Given a table...
CREATE TABLE foo (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
...
);
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
Copied from https://github.com/code-kitchen/django-utensils/ and licensed under the MIT license. |
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
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC06J4JLI+WCSu49Ht8Oj62nEKWI0d+rx/mqDmsASIi8DgNsXnVYz8+jU8Oiq80InPpMBziciRIJ10fjLCLjG4QXCuPzT3SenYD2XQ7owseeybjAvTd6rEVOu+iTRefTdhZwaiedp8/hrsJbK9oykTdFjAF2nCh1EKw78qo9UlLmzRVmc4cnlLk8K+BMMWBUPthV6h6yl/iNN9buiGr3IUtKo6cWAoLVup1+E/4eh5MBVPSF+2Gv/R6sa8ffAKLZizS/W2Jdbd8nhw9x9P/h9E/FNCdzwC00Qdf/M6a+56SePeiKRMaJ/AluFeqQg5HMIKEVIGz21ySaPkatafnkZxy0xUcW85OUk0DjK/+omTOENDI5xjwotMx95rr6dXkaxAH9fhsJr1oToM2jM1BysoSwKFp7KZkd/WsuGSMK/a4+ag++YIa+E5gGS8VG4a0Wb5V1qk+hEpkl852Lx0fkWqnBmCOxrtUlZEUuCJKRFG2kHnDlpkYqKQmdYJmSopXae+u2+Xz3QiBuHT9kbFPccUwmfgCyLJMZ/2/YMJeUy05PfEEUEeSf3W6ESclbbCMeKWHKJwEgP68W/AmEI6imisvbNN6IbG6XQPXIEG1segkZMg/fZXI+AR9zKU5wM8Dk1YrRAU8BUWMAvCNJWL8EBK3WtIWxExlSWySzND5PaIQnQ== ben@kirsche |
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
# Adapted from: http://dillieodigital.wordpress.com/2011/06/16/sorting-latitudelongitude-positions-by-distance-in-sql/ | |
SELECT | |
*, 6378 * 2 * ASIN( | |
SQRT( | |
POWER( | |
SIN((51.5081 - latitude) * pi() / 180 / 2), | |
2 | |
) + COS(51.5081 * pi() / 180) * COS(latitude * pi() / 180) * POWER( | |
SIN((0.1281 - longitude) * pi() / 180 / 2), | |
2 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>gutterSettings</key> | |
<dict> |
NewerOlder