Skip to content

Instantly share code, notes, and snippets.

<form action="/restcart/cart/12456" method="POST">
<input type="number" name="productNo" value="1">
<input type="text" name="description" value="An item">
<input type="number" name="price" value="19.95">
<input type="number" name="sku" value="123456789">
<input type="number" name="quantity" value="1" min="1" max="99" required>
</form>
@peterk
peterk / gist:3972575
Created October 29, 2012 09:25
Skatteverket i LIbris
<http://libris.kb.se/resource/auth/230897> rdfs:isDefinedBy <http://data.libris.kb.se/open/auth/230897.n3> .
<http://libris.kb.se/resource/auth/230897> rdf:type <http://xmlns.com/foaf/0.1/Organization> .
<http://libris.kb.se/resource/auth/230897> foaf:name "Sverige. Skatteverket" .
<http://libris.kb.se/resource/auth/230897> foaf:name "Skatteverket" .
<http://libris.kb.se/resource/auth/230897> foaf:name "SKV" .
<http://libris.kb.se/resource/auth/230897> foaf:name "Sweden. National Tax Board" .
<http://libris.kb.se/resource/auth/230897> foaf:name "Swedish National Tax Board" .
<http://libris.kb.se/resource/auth/230897> foaf:name "Swedish Tax Agency" .
<http://libris.kb.se/resource/bib/10909083> dc:subject <http://libris.kb.se/resource/auth/230897> .
<http://libris.kb.se/resource/bib/10909083> dc:subject <http://libris.kb.se/resource/auth/230897#concept> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
skos:altLabel a owl:AnnotationProperty,
rdf:Property;
rdfs:label "alternativ term"@sv;
rdfs:comment "Omfattningen av skos:altLabel är klassen RDF plain literals."@sv,
<?php
/*
* FileSender www.filesender.org
*
* Copyright (c) 2009-2012, AARNet, Belnet, HEAnet, SURFnet, UNINETT
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@peterk
peterk / keybase.md
Created December 22, 2014 21:47
keybase.md

Keybase proof

I hereby claim:

  • I am peterk on github.
  • I am peterkz (https://keybase.io/peterkz) on keybase.
  • I have a public key whose fingerprint is 6B1C DBF2 E238 3CA8 14DA 0E0D 797F 8A85 D84F D57B

To claim this, I am signing this object:

@peterk
peterk / tweaks.txt
Created September 15, 2015 15:23
Tweaks
Denna rade görs om:
var twitterBtn = '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
till:
var twitterBtn = '';
Hela detta block
@peterk
peterk / tweaks.txt
Last active April 23, 2017 17:49
Tweaks
Denna rad görs om:
var twitterBtn = '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
till:
var twitterBtn = '';
Hela detta block raderas:
@peterk
peterk / wplinkcheck.py
Last active September 21, 2015 17:46
Checks Swedish Wikipedia for pages containing links from domain specified and then checks link availability
import requests
import argparse
from lxml import html
class bcolors:
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
import sys
from os import listdir
from os.path import isfile, join
import os
import re
import gensim, logging
model = gensim.models.Word2Vec.load("gensim2.model")
model.most_similar(positive=['skola', 'vuxen'], negative=['elev'])