Skip to content

Instantly share code, notes, and snippets.

View fmarier's full-sized avatar

Francois Marier fmarier

View GitHub Profile
@fmarier
fmarier / no-set-cookie.js
Created April 30, 2012 23:21
Sample code demonstrating a node-client-sessions bug (issue 14)
@fmarier
fmarier / different-paths.js
Created April 30, 2012 23:23
Sample code demonstrating a node-client-sessions bug (issue 14)
#!/usr/bin/env node
const
express = require('express'),
app = express.createServer(),
clientSessions = require("client-sessions");
app.use(clientSessions({
secret: 'secret',
cookie: {
@fmarier
fmarier / gist:6146262
Last active December 20, 2015 14:28 — forked from aaronpk/gist:5846789
Fix typo in Aaron's webfinger rewrite rule
[[email protected] www]$ cat .htaccess
RewriteEngine on
RewriteCond %{QUERY_STRING} resource=acct:(.+)
RewriteRule ^/.well-known/webfinger /profile/%1? [L]
[[email protected] www]$ cat profile/[email protected]
{
"subject": "acct:[email protected]",
"links": [
{
@fmarier
fmarier / keybase.md
Created March 20, 2014 21:12
Keybase proof

Keybase proof

I hereby claim:

  • I am fmarier on github.
  • I am fmarier (https://keybase.io/fmarier) on keybase.
  • I have a public key whose fingerprint is 8C47 0B2A 0B31 568E 110D 4325 1628 1F2E 007C 98D1

To claim this, I am signing this object:

@fmarier
fmarier / necko-walkthrough.md
Last active August 29, 2015 14:07
nsDocShell as an example client of the nsIHttpChannel API

nsDocShell as an example client of the nsIHttpChannel API

by Stephen Workman

  1. nsDocShell::LoadURI(string)
    • create nsIURI from string
  2. nsDocShell::LoadURI(nsIURI)
    • creates 2 nsIInputStream for read response from; passes them with URI to ...
  3. nsDocShell::InternalLoad
--- /tmp/muli1.css 2019-11-15 15:23:17.118365776 -0800
+++ /tmp/muli2.css 2019-11-15 15:23:43.893940366 -0800
@@ -2,6 +2,30 @@
@font-face {
font-family: 'Muli';
font-style: italic;
+ font-weight: 200;
+ src: url(./muli/Muli_200_italic_19882c2c7f40473fb6ffcf2c9ae29c9d_vietnamese_v11.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
+}
--- poppins1.css 2019-11-15 17:41:43.198503250 -0800
+++ poppins2.css 2019-11-15 17:41:58.294222079 -0800
@@ -1,4 +1,51 @@
-
+/* devanagari */
+@font-face {
+ font-family: 'Poppins';
+ font-style: italic;
+ font-weight: 100;
+ src: url(./poppins/Poppins_100_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2');
FILE: /home/francois/devel/admin-columns/src/js/admin/columns/form.js
----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
158 | ERROR | HTML string concatenation detected, this is a security risk, use DOM node construction or a
| | templating language instead: attr_class+. (WordPressVIPMinimum.JS.StringConcat.Found)
158 | ERROR | HTML string concatenation detected, this is a security risk, use DOM node construction or a
| | templating language instead: message+. (WordPressVIPMinimum.JS.StringConcat.Found)
158 | ERROR | HTML string concatenation detected, this is a security risk, use DOM node construction or a
| | templating language instead: +'</p></div>'. (WordPressVIPMinimum.JS.StringConcat.Found)
@fmarier
fmarier / resolve-urls.py
Created January 4, 2022 05:15
Expand URLs for Brave News RSS feeds
#!/usr/bin/python3
import csv
import requests
from urllib.parse import urlparse, urlunparse
def feedburner_upgrade(url):
parsed = urlparse(url)
if parsed.netloc in ('feeds2.feedburner.com', 'feeds.feedburner.com', 'feedproxy.google.com'):
return parsed._replace(scheme='https').geturl()
@fmarier
fmarier / quad9.org
Created April 20, 2022 00:14
Defending against nation-state (legal) attack: how to build a privacy-protecting service in the era of ubiquitous surveillance