Skip to content

Instantly share code, notes, and snippets.

View jnv's full-sized avatar

Jan Vlnas jnv

View GitHub Profile
@jnv
jnv / shotdetect2csv.rb
Created March 14, 2014 22:35
Converts Shotdetect's results.xml file to CSV
#!/usr/bin/env ruby
# Extracts shotdetect's results.xml file to csv
# with relative position of shot in movie.
# Writes converted file to results.csv file.
#
# Usage: ./shotdetect2csv.rb results.xml
require "nokogiri"
require "csv"
@jnv
jnv / data.tsv
Last active August 29, 2015 13:57
(WIP) Srovnání kalorické hodnoty a sacharidů
type name price kcal sacharides sugar qty
d Cappy Jablko 39.9 47 11.3 11.3 1000
d Hello Jablko 37.9 45 11 9.6 1000
d Hello Čerstvě vylisovaná jablečná šťáva 39.9 40 9.8 8.4 1000
d Relax Jablko 39.9 42 10.2 10.2 1000
o Kubík Multivitamín 16.9 52.10333333 12.2 11.9 300
o Jupík Jahoda 16.5 24 6 6 330
m Rubín Jablko 40.9 40 9.83 0 1000
d Pfanner Jablko 47.9 44 10.3 9.9 1000
d Relax Pomeranč 42.9 44 10 10 1000
@jnv
jnv / 02-building_stones.ipynb
Created June 4, 2014 13:27
Example IPython notebook with Ruby
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require 'multi_xml'
require 'pp'
xml = <<-EOF
<atom:feed xmlns="http://kosapi.feld.cvut.cz/schema/3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:osearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:base="https://kosapi.fit.cvut.cz/api/3" xml:lang="cs">
<atom:link atom:rel="next" href="courses?offset=10&amp;limit=10"/>
<osearch:startIndex>0</osearch:startIndex>
</atom:feed>
EOF
@jnv
jnv / gdocsunblinkcaret.user.js
Last active August 29, 2015 14:04
Disables blinking caret in Google Docs and turns it into pretty blue colour. https://greasyfork.org/cs/scripts/4053-unblinking-blue-caret-in-google-docs
// ==UserScript==
// @name Unblinking Blue Caret in Google Docs
// @description Disables blinking caret (cursor) in Google Docs, makes it a bit thicker and gives it a pleasant blue color, ala iA Writer.
// @id gdocsunblinkcaret@jnv.gihtub.io
// @namespace https://jnv.github.io
// @domain docs.google.com
// @include http://docs.google.com/*
// @include https://docs.google.com/*
// @author Jan Vlnas http://jan.vlnas.cz
// @developer Dan Burd http://danburd.com
// ==UserScript==
// @id fbrecomhide@jnv.gihtub.io
// @name Hide Recommendations on Facebook
// @description Removes "People you may know", "Recommended Pages" and similar on Facebook.
// @version 2015.07.12
// @namespace http://jnv.github.io
// @domain www.facebook.com
// @include http://www.facebook.com/*
// @include https://www.facebook.com/*
// @grant GM_addStyle
@jnv
jnv / facebook.js
Created October 15, 2014 10:17
#selfXSS
// Remove all groups at https://www.facebook.com/browsegroups/
[].forEach.call(document.querySelectorAll('.declineButton'),function(e){e.click()})
// Reject all recommendations at https://www.facebook.com/suggestions/rate/
[].forEach.call(document.querySelectorAll('a[ajaxify*="event=No"]'),function(e){e.click()})
// Remove all FB pages suggestions at https://www.facebook.com/pages/
[].forEach.call(document.querySelectorAll('._5l77'),function(e){e.click();})
@jnv
jnv / .gitignore
Last active August 29, 2015 14:19
Failing example for atomify with rework-inherit
node_modules/
dist/
@jnv
jnv / feedlyexpand.user.js
Created August 30, 2015 14:16
Remove width limitations on Feedly; useful for pictures and comics.
// ==UserScript==
// @id feedlyexpand@jnv.gihtub.io
// @name Feedly - Expand Content
// @version 2015.06.15
// @namespace http://jnv.github.io
// @author jnv
// @description Remove width limitations on Feedly; useful for pictures and comics.
// @include https://feedly.com/*
// @include http://feedly.com/*
// @domain feedly.com
@jnv
jnv / githubavisited.user.js
Created August 30, 2015 14:45
Color visited links on GitHub
// ==UserScript==
// @id githubavisited@jnv.github.io
// @name Color visited links on GitHub
// @version 0.1
// @namespace http://jnv.github.io
// @include https://github.com/*
// @domain github.com
// @grant GM_addStyle
// ==/UserScript==