Infinite argyle with random ColorBrewer and d3 4.0 color scales.
This file contains 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 selenium.webdriver.common.action_chains import ActionChains | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.support import expected_conditions | |
from time import sleep | |
from os import getcwd | |
# JavaScript: Drag and drop script | |
# param1 (WebElement): Source element to drag |
This file contains 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/python3 | |
from contextlib import contextmanager | |
from ast import NodeVisitor | |
import ast | |
import sys | |
import glob | |
class Flags: | |
include_strings = True |
This file contains 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 selenium import webdriver | |
import time | |
# JavaScript: HTML5 Drag and drop script | |
# param1 (WebElement): Source element to drag | |
# param2 (WebElement): Optional - target element for the drop | |
# param3 (int): Optional - Drop offset x relative to the target if any or source element | |
# param4 (int): Optional - Drop offset y relative to the target if any or source element | |
# param4 (int): Optional - Delay in milliseconds (default = 1ms) for dragging and dropping | |
# param5 (string): Optional - Key pressed (alt or ctrl or shilf) |
This file contains 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
license: mit | |
height: 640 |
This file contains 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
/* | |
This script attempts to identify all CSS classes mentioned in HTML but not defined in the stylesheets. | |
In order to use it, just run it in the DevTools console (or add it to DevTools Snippets and run it from there). | |
Note that this script requires browser to support `fetch` and some ES6 features (fat arrow, Promises, Array.from, Set). You can transpile it to ES5 here: https://babeljs.io/repl/ . | |
Known limitations: | |
- it won't be able to take into account some external stylesheets (if CORS isn't set up) | |
- it will produce false negatives for classes that are mentioned in the comments. |
This file contains 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
function simulateDragDrop(sourceNode, destinationNode) { | |
var EVENT_TYPES = { | |
DRAG_END: 'dragend', | |
DRAG_START: 'dragstart', | |
DROP: 'drop' | |
} | |
function createCustomEvent(type) { | |
var event = new CustomEvent("CustomEvent") | |
event.initCustomEvent(type, true, true, null) |
This file contains 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
#!/bin/sh | |
matches=$(git diff --cached | grep -E '\+.*?FIXME') | |
if [ "$matches" != "" ] | |
then | |
echo "'FIXME' tag is detected." | |
echo "Please fix it before committing." | |
echo " ${matches}" | |
exit 1 |
This file contains 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
time sudo cpio -idm < ../bash-4.2-37.4.mga3.x86_64.cpiodec | |
Proper cpio: | |
real 0m0.031s | |
user 0m0.003s | |
sys 0m0.027s | |
Using dd: | |
real 0m3.277s | |
user 0m0.103s |
This file contains 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
/* WebKit */ | |
-webkit-filter: invert(); | |
/* Firefox */ | |
filter: url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='negative'><feColorMatrix values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0'/></filter></svg>#negative"); | |
/* IE 6-7 */ | |
filter: progid:DXImageTransform.Microsoft.BasicImage(invert=1); | |
/* IE 8 */ | |
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(invert=1)'; |
NewerOlder