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 colormath.color_objects import sRGBColor, LabColor | |
from colormath.color_conversions import convert_color | |
from colormath.color_diff import delta_e_cie2000 | |
def hex_to_rgb(h): | |
return sRGBColor(h / 0x10000, (h / 0x100) % 0x100, h % 0x100, | |
is_upscaled=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
#! /bin/bash | |
# The Purpose of this Script is to batch convert and compress any video file to mp4 format | |
# | |
# WARNING: LOSSY COMPRESSION !!! | |
# Variable used: | |
# sourcedir is the directory where to be converted videos are. Converted video will be saved in the same folder | |
# usage: |
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
const xml = ` | |
<XMLText class="yeah-attributes"> | |
regular text | |
<XMLBold> | |
bold text | |
</XMLBold> | |
another text | |
</XMLText> | |
`; |
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
var crypto = require('crypto'); | |
// larger numbers mean better security, less | |
var config = { | |
// size of the generated hash | |
hashBytes: 32, | |
// larger salt means hashed passwords are more resistant to rainbow table, but | |
// you get diminishing returns pretty fast | |
saltBytes: 16, | |
// more iterations means an attacker has to take longer to brute force an |