ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
#!/usr/bin/env ruby | |
require "rubygems" | |
require "twitter" | |
require "json" | |
require "faraday" | |
# things you must configure | |
TWITTER_USER = "your_username" | |
# get these from dev.twitter.com |
{% load i18n static template_tags %} | |
<html> | |
<head> | |
<title>Hello, world!</title> | |
</head> | |
<body> | |
<h1>This is an SVG, inserted as an object.</h1> | |
{% svgobject 'images/svg/test.svg' 'test-class-one' 'test-class-two' %} | |
</body> |
#!/bin/bash | |
# create_yosemite_iso.sh: Create a bootable .iso OS X Yosemite installer (for use with e.g. VirtualBox) | |
# See https://gist.github.com/cellularmitosis/6e902579296e82ec6273 | |
# This is a (slightly) edited version of IOOI SqAR's script. | |
# See http://sqar.blogspot.de/2014/10/installing-yosemite-in-virtualbox.html | |
# Changes from IOOI SqAR's script include: | |
# * Use 'hdiutil makehybrid' to convert the .cdr image to a "real" .iso image. |
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// Update 'version' if you need to refresh the cache | |
var staticCacheName = 'static'; | |
var version = 'v1::'; |
from datetime import datetime | |
import json | |
import requests | |
import sys | |
from bs4 import BeautifulSoup | |
from django.core.management.base import BaseCommand | |
from django.contrib.auth.models import User |
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
(* | |
http://zoesmith.io | |
Export Bookmarks from Evernote to Pinboard | |
v1.4 12th September 2012 | |
This script takes selected notes in Evernote and sends an email for each to Pinboard, extracting each note's title, source URL and associated tags. The user should enter their Pinboard email address in the pinboardEmail property below, and can choose a default tag to add to each bookmark on import. | |
This code is hacky, horrible and non-error checking (but it worked for me). Don't use on thousands of notes at a time, it'll go all crashy. Try selecting one test note first to see if it works for you. | |
Change log: |
Here's a view using TemplateResponse. This test will run without needing to set up urls or add templates to the file system.
def my_view(request, template_name):
return TemplateResponse(request, template_name, {"foo": "bar"})
class MyTest(TestCase):
def test_get(self):