Skip to content

Instantly share code, notes, and snippets.

Avatar

Lynn Root econchick

View GitHub Profile
@econchick
econchick / gist:4085203
Created Nov 16, 2012
templates/blog/list.html
View gist:4085203
{% extends "base.html" %}
{% block content %}
<div class="main">
<!-- Posts -->
<ul>
{% for post in posts.object_list %}
<div class="title">{{ post.title }}</div>
<ul>
@econchick
econchick / gist:4085210
Created Nov 16, 2012
templates/blog/post.html
View gist:4085210
{% extends "base.html" %}
{% block content %}
<div class="main">
<!-- Posts -->
<ul>
<div class="title">{{ post.title }}</div>
<ul>
<div class="time">{{ post.created }}</div>
<div class="body">{{ post.body|linebreaks }}</div>
@econchick
econchick / gist:4085215
Created Nov 16, 2012
RuPyBlog/static/images/2px.png
View gist:4085215
8950 4e47 0d0a 1a0a 0000 000d 4948 4452
0000 0014 0000 0002 0802 0000 00d7 646b
dc00 0000 0373 4249 5408 0808 dbe1 4fe0
0000 0009 7048 5973 0000 0b12 0000 0b12
01d2 dd7e fc00 0000 1474 4558 7443 7265
6174 696f 6e20 5469 6d65 0032 2f32 2f31
32c6 8a98 be00 0000 1c74 4558 7453 6f66
7477 6172 6500 4164 6f62 6520 4669 7265
776f 726b 7320 4353 3571 b5e3 3600 0000
1549 4441 5408 9963 cc2d ad67 2017 306a
@econchick
econchick / gist:4085219
Created Nov 16, 2012
RuPyBlog/static/images/bullet.png
View gist:4085219
8950 4e47 0d0a 1a0a 0000 000d 4948 4452
0000 0006 0000 0006 0802 0000 006f ae78
1f00 0003 f069 4343 5049 4343 2050 726f
6669 6c65 0000 2891 8d55 dd6f db54 143f
896f 5ca4 163f a0b1 8e0e 158b af55 535b
b91b 1aad c606 4993 a5e9 421a b9cd d82a
a4c9 756e 1a53 d736 b6d3 6d55 9ff6 026f
0cf8 0380 b207 1e90 7842 1a0c c4f6 b2ed
01b4 4953 4115 d524 a43d 74da 4068 93f6
82aa 70ae af53 bb5d c6b8 91af 7f39 e777
@econchick
econchick / gist:4085230
Created Nov 16, 2012
RuPyBlog/static/images/pages.png
View gist:4085230
8950 4e47 0d0a 1a0a 0000 000d 4948 4452
0000 0032 0000 0014 0806 0000 00cf ca6e
9a00 0000 0970 4859 7300 000b 1300 000b
1301 009a 9c18 0000 022b 6954 5874 584d
4c3a 636f 6d2e 6164 6f62 652e 786d 7000
0000 0000 3c78 3a78 6d70 6d65 7461 2078
6d6c 6e73 3a78 3d22 6164 6f62 653a 6e73
3a6d 6574 612f 2220 783a 786d 7074 6b3d
2258 4d50 2043 6f72 6520 342e 342e 3022
3e0a 2020 203c 7264 663a 5244 4620 786d
@econchick
econchick / gist:4085231
Created Nov 16, 2012
RuPyBlog/static/css/main.css
View gist:4085231
article,
figcaption,
figure,
footer,
header,
nav,
section,
time {
display: block;
}
@econchick
econchick / settings.py
Created Nov 25, 2012
ZagrebWorkshop/ZagrebWorkshop/settings.py
View settings.py
# Django settings for ZagrebWorkshop project.
import os
import dj_database_url
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
@econchick
econchick / How to Build OpenShift Server on F17
Created Nov 27, 2012
How to Build OpenShift Server on F17
View How to Build OpenShift Server on F17
Start with Fedora 17
yum install -y git vim rubygem-thor rubygem-parseconfig tito make rubygem-aws-sdk tig mlocate bash-completion rubygem-yard rubygem-redcarpet ruby-devel redhat-lsb
yum install -y http://kojipkgs.fedoraproject.org//packages/selinux-policy/3.10.0/160.fc17/noarch/selinux-policy-3.10.0-160.fc17.noarch.rpm http://kojipkgs.fedoraproject.org//packages/selinux-policy/3.10.0/160.fc17/noarch/selinux-policy-devel-3.10.0-160.fc17.noarch.rpm http://kojipkgs.fedoraproject.org//packages/selinux-policy/3.10.0/160.fc17/noarch/selinux-policy-doc-3.10.0-160.fc17.noarch.rpm http://kojipkgs.fedoraproject.org//packages/selinux-policy/3.10.0/160.fc17/noarch/selinux-policy-minimum-3.10.0-160.fc17.noarch.rpm http://kojipkgs.fedoraproject.org//packages/selinux-policy/3.10.0/160.fc17/noarch/selinux-policy-mls-3.10.0-160.fc17.noarch.rpm http://kojipkgs.fedoraproject.org//packages/selinux-policy/3.10.0/160.fc17/noarch/selinux-policy-targeted-3.10.0-160.fc17.noarch.rpm
gem install rspec -v '1.1.12'
for i in origin-
@econchick
econchick / gist:4666389
Last active Dec 11, 2015
Convert decimal/base 10 numbers to hexidecimal/base 16
View gist:4666389
def hex2dec(dec_number):
mapping = {
10 : "A",
11 : "B",
12 : "C",
13 : "D",
14 : "E",
15 : "F"
}
@econchick
econchick / gist:4666365
Created Jan 29, 2013
Python questions asked at Women Who Code's Interview workshop
View gist:4666365
unsorted_list = [1, 4, 12, 3, 0, 4, 1, 16, 20, 20, 19, 7, 4, 0]
# Terrible solution that only works small integers, but it is O(n) in both
# space and time
max_int = max(unsorted_list)
entries = [0] * (max_int + 1)
for x in unsorted_list:
entries[x] += 1
You can’t perform that action at this time.