Skip to content

Instantly share code, notes, and snippets.

View krzysztofjeziorny's full-sized avatar

Krzysztof Jeziorny krzysztofjeziorny

View GitHub Profile
@robinsloan
robinsloan / unfave.rb
Last active November 6, 2024 14:29
Unfave script, because why not??
#!/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
@chrisvoncsefalvay
chrisvoncsefalvay / example_file.html
Created September 27, 2016 21:29
Insert SVG as <object> in Django
{% 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>
@cellularmitosis
cellularmitosis / create_yosemite_iso.sh
Last active March 14, 2016 11:59
create_yosemite_iso.sh: Create a bootable .iso OS X Yosemite installer (for use with e.g. VirtualBox)
#!/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.
@adactio
adactio / basicServiceWorker.js
Last active March 27, 2023 09:30
A basic Service Worker, for use on, say, a blog.
'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::';
@shacker
shacker / import_drupal_pages.py
Created August 20, 2015 18:44
Django management command to import flat Drupal page sets into a wagtail tree
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
@lopezjurip
lopezjurip / README.md
Last active September 10, 2023 06:27
Write to NTFS on OSX Yosemite and El Capitan

OUTDATED, see comments below

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@addyosmani
addyosmani / README.md
Last active April 29, 2025 13:39 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@pburtchaell
pburtchaell / styles.css
Last active February 12, 2025 08:45
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* 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:
anonymous
anonymous / test.md
Created June 9, 2014 00:13

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):