Skip to content

Instantly share code, notes, and snippets.

View jtojnar's full-sized avatar
💤

Jan Tojnar jtojnar

💤
  • ogion.cz
  • Czech Republic
View GitHub Profile
@remy
remy / details.js
Created April 18, 2010 22:28
Add <details> support - includes stylesheet
/**
* Note that this script is intended to be included at the *end* of the document, before </body>
*/
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return function (el, type, fn) {
@anateus
anateus / Monokai.tmTheme
Created May 10, 2012 22:07 — forked from chrisyip/Monokai.tmTheme
Monokai for Sublime Text: Markdown supported + some additional element differentiation
<?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">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai</string>
<key>settings</key>
<array><dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_CB4B16FF</string><key>settings</key><dict><key>background</key><string>#CB4B16FF</string><key>caret</key><string>#FFFFFFFF</string><key>foreground</key><string>#FFFFFFFF</string></dict></dict>
<dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_839496FF</string><key>settings</key><dict><key>background</key><string>#839496FF</string><key>caret</key><string>#000000FF</string><key>foreground</key><string>#000000FF</string></dict></dict>
<dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_F8F8F2FF</string><key>settings</key><dict><key>background</key><string>#F8F8F2FF</string><key>caret</key><string>#000000FF</string><key>foreground</key><
@i-scorpion
i-scorpion / README.txt
Created June 18, 2012 12:24
Twitter bootstrap fixed table header using jQuery
Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled.
Using the code from twitter bootstrap documentation page, this code is customized for table header.
Create the table with following layout -
<table class="table-fixed-header">
<thead class="header">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
@helloitszak
helloitszak / quick_ed2k.rb
Last active August 1, 2016 20:11
This quickly gets ed2k links for anidb crequing.
#!/usr/bin/env ruby
require 'openssl'
if ARGV.length == 0
puts "This quickly gets ed2k links for anidb crequing."
puts "Usage: #{$0} [files]"
exit
end
def ed2k(file_name)
@bmcbride
bmcbride / geojson-length.py
Created March 31, 2014 20:41
Calculate the length of a GeoJSON linestring using the Python GDAL/OGR API
from osgeo import ogr
from osgeo import osr
source = osr.SpatialReference()
source.ImportFromEPSG(4326)
target = osr.SpatialReference()
target.ImportFromEPSG(3857)
transform = osr.CoordinateTransformation(source, target)
@magnetikonline
magnetikonline / README.md
Last active July 7, 2024 05:27
Setting Nginx FastCGI response buffer sizes.
@jeffbr13
jeffbr13 / wikipedia-subheading-links.js
Created April 28, 2014 23:56
Greasemonkey script to add link anchors to Wikipedia page subheadings
@martijnvermaat
martijnvermaat / nixos.md
Last active July 13, 2024 09:08
Installation of NixOS with encrypted root
{-# LANGUAGE MagicHash, UnboxedTuples #-}
module Main(main) where
import GHC.Exts ( addrToAny# )
import GHC.Ptr ( Ptr(..) )
import System.Info ( os, arch )
import Encoding
import ObjLink
main :: IO ()
@snoyberg
snoyberg / upper-bounds.md
Created May 27, 2016 03:13
Michael Snoyman's personal take on PVP version upper bounds

In response to a request on Reddit, I'm writing up my thoughts on PVP upper bounds. I'm putting this in a Gist since I don't want to start yet another debate on the matter, just provide some information to someone who asked for it. Please don't turn this into a flame war :)

For those unaware: the Package Versioning Policy is a set of recommendations covering how to give version numbers to your packages, and how to set upper and lower bounds on your dependencies.

I'll start by saying: I support completely with the PVP's recommendations on how to assign version numbers. While there are plenty of points in this design space, the PVP is an unobjectionable one, and consistency in the community is good. On multiple occasions, I have reached out to package authors to encourage compliance with this. (However, I've always done so privately, as opposed to a statement on Reddit, as I believe that to be a more likely route to successful convincing.)

The issue aro