This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import re | |
import sys | |
from xpidl import xpidl | |
def _get_xpidl_interface_docs(i): | |
# This function is horrible. We probably need full docblock parsing | |
# support to extract @param. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accounts: | |
- list: (read permission) | |
- name | |
- type | |
- folders | |
- identities | |
messages: | |
- query (read permission) | |
- sender |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import atan, hypot, degrees | |
paths = [ | |
[ | |
[100, 0], | |
[0, 100], | |
[-100, 0], | |
[0, -100], | |
] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for use on https://www.youtube.com/watch?v=e1X4RPDE-48 | |
var video = document.querySelector('video'); | |
var count = 0; | |
var interval = null; | |
video.ontimeupdate = function(event) { | |
if (interval === null && !this.paused && this.currentTime > 175 && this.currentTime < 180) { | |
console.log('start'); | |
count = 0; | |
interval = setInterval(doIt, 40); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var script = 'data:text/plain,' + encodeURIComponent(` | |
let DOMUtils = Components.classes['@mozilla.org/inspector/dom-utils;1'].getService(Components.interfaces.inIDOMUtils); | |
for (let ss of content.document.styleSheets) { | |
if (content.matchMedia(ss.media.mediaText).matches) { | |
content.console.log(ss); | |
for (let r of ss.cssRules) { | |
rule(r); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var script = 'data:text/plain,' + encodeURIComponent(` | |
var cursors = { | |
pointer: 'red', | |
text: 'blue' | |
}; | |
var lastEvent; | |
var left = 200; | |
var top = 0; | |
var canvas = content.document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); | |
canvas.width = 800; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import argparse, math | |
parser = argparse.ArgumentParser() | |
parser.add_argument(dest='width', type=int) | |
parser.add_argument(dest='height', type=int) | |
parser.add_argument('-s', dest='spacing', type=int, nargs='?', default=20) | |
parser.add_argument('-b', dest='blackness', type=float, nargs='?', default=0.75) | |
args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> | |
<_name>My Guides Creator</_name> | |
<id>net.darktrojan.myguidescreator</id> | |
<dependency type="executable" location="extensions">my_guides_creator.py</dependency> | |
<dependency type="executable" location="extensions">inkex.py</dependency> | |
<param name="vertical_guides" type="int" min="1" max="1000" _gui-text="Columns:">2</param> | |
<param name="horizontal_guides" type="int" min="1" max="1000" _gui-text="Rows:">3</param> | |
<param name="guide_margin" type="int" min="0" max="20" _gui-text="Margin around guides (mm)">10</param> | |
<param name="start_from_edges" type="boolean" _gui-text="Start from edges">true</param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv, re | |
from hashlib import sha1 | |
from math import cos, radians, sin, atan, degrees, pi, sqrt, hypot | |
csv.field_size_limit(13107200) | |
paths = dict() | |
with open('tm-world-borders-03.csv', 'r') as csvfile: | |
csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
</head> | |
<body> | |
<video id="video" width="480" height="360"></video> | |
<canvas id="canvas1" width="480" height="360"></canvas> | |
<canvas id="canvas2" width="480" height="360"></canvas> | |
<canvas id="canvas3" width="480" height="360"></canvas> |
NewerOlder