Skip to content

Instantly share code, notes, and snippets.

View karlcow's full-sized avatar
⛩️
Working from … anywhere

Karl Dubost karlcow

⛩️
Working from … anywhere
View GitHub Profile
@karlcow
karlcow / httpget
Created August 14, 2012 02:18
Location to nowhere
→ http GET http://tabnak.ir/
HTTP/1.1 301 Moved Permanently
Date: Tue, 14 Aug 2012 02:17:01 GMT
Server: Apache
X-Powered-By: PHP/5.2.16
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: version=deleted; expires=Mon, 15-Aug-2011 02:17:00 GMT
@karlcow
karlcow / thoughts.mdown
Created October 6, 2012 21:31
About interacting with David Thoughts

A small note in David Larlet's thoughts says he is frustrated about not having interactions in his thoughts. Christian Fauré made a comment on twitter about:

  1. Writing in French instead of English.
  2. Having the possibility for comments.

I started to write a tweet for answering to Christian and David and thought, Twitter is not the right place. But I still have a stream of thoughts that I could share. Usenet was quite practical for this in the past. Very handy for sharing thoughts and discussing at the same time without any approval… until the first spam on Usenet, but I digress or more exactly it is too early for this arguement.

French or English

A long time ago I decided to write in French on my blog. I do not care about the language. Two motivations, I was writing in the language I was more comfortable with at the time AND I was talking about technology which I thought needed to per

@karlcow
karlcow / thoughts.mdown
Created October 7, 2012 11:30 — forked from davidbgk/thoughts.mdown
About interacting with David Thoughts

Online Discussions And Interactions

License

This document is under CC0 aka equivalent of public domain. People may fork it at will so it will travel through space and time without a precise ownership and might blossom in thousand of branches.

Contributing to this document

You may fork, rewrite a poem, take a stroll and make a photo album with it, add a comment, it doesn't matter. At least a few branches or outcomes of this document might create something owned by our collective mind more than individual. Maybe it will die, it doesn't matter. It really depends on the desire of the people involved to make it alive.

@karlcow
karlcow / moinmoin.txt
Created October 9, 2012 01:32
Content-Type triggering download
→ curl -sI http://hg.moinmo.in/moin/1.9/raw-file/1.9.5/docs/CHANGES
HTTP/1.1 200 Script output follows
Date: Tue, 09 Oct 2012 01:30:36 GMT
Server: Apache/2.2.16 (Debian)
ETag: 1348837471.0
Content-Disposition: inline; filename="CHANGES"
Content-Length: 260347
Vary: Accept-Encoding
Content-Type: application/binary
@karlcow
karlcow / parisweb2012.mdown
Created October 21, 2012 17:57
Paris Web 2012

Paris Web 2012 Feedback

Disponible aussi avec un URL stable sur La Grange

Ce document est un complément au formulaire de feedback n'offrant pas la possibilité d'apporter des nuances aux questions-réponses. Les idées et textes sont réutilisables à loisir sans avoir à me demander CC0.

Format des présentations

Les conférences de 20 minutes sont plutôt bien car elles permettent à l'orateur de se concentrer sur un sujet donné. En revanche, elle devrait permettre à l'audience de pouvoir poser quelques questions. Les grandes conférences peuvent être intéressantes si on est sûr de pouvoir y apprendre quelque chose de vraiment profond et très technique. Cependant elles ont tendance à immobiliser les gens surtout si assis au milieu d'une rangée dans le grand amphithéâtre par exemple.

@karlcow
karlcow / log
Created November 6, 2012 13:42
Test of python seleniumwrapper
→ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import seleniumwrapper as selwrap
>>> f = selwrap.create("firefox"); o = selwrap.create("opera")
6 nov. 2012 08:37:45 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
08:37:51.440 INFO - Java: Apple Inc. 20.12-b01-434
08:37:51.444 INFO - OS: Mac OS X 10.7.5 x86_64
→ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> webdriver.DesiredCapabilities.OPERA["opera.logging.level"] = "SEVERE"
>>> browser = webdriver.Opera(desired_capabilities=webdriver.DesiredCapabilities.OPERA)
7 nov. 2012 06:11:15 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
06:11:20.659 INFO - Java: Apple Inc. 20.12-b01-434
@karlcow
karlcow / microdata-geoloc.html
Created December 6, 2012 01:42
experiment of accessing Microdata in an html page with microdata API
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Microdata and Geolocation</title>
</head>
<body>
<ul>
<li itemscope itemtype="http://schema.org/Place">
<!doctype html>
<html lang="fr">
<head>
<title>Test of CSS hits with lang</title>
<style>:lang(ja) {font-family: "Hiragino Sans GB W3";color:red;}</style>
</head>
<body>
<p>Testing a hits number for CSS selectors</p>
</body>
</html>
@karlcow
karlcow / gethyperel.py
Last active December 10, 2015 16:28
Prototype for demonstrating the collection of link and rel in the case of hypermedia APIs.
#!/usr/bin/env python2.7
# encoding: utf-8
import sys
import string
from pprint import pprint
from urlparse import urljoin
from lxml.html import html5parser
import argparse