Rules regex-replaces in TagScanner
Thank you for your attention! 😊
Please write to me if you encounter a problem or wish to supplement the list! 🔥
[—–]
-> -
(simbol [minus])
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
''' | |
------------------------------------------------------------------------------ | |
Small Color Logger for Python. | |
For test run it in consol >> python sc_logger.py | |
------------------------------------------------------------------------------ | |
How use: | |
from sc_logger import Logger | |
log = Logger() # initialize logger |
import re, json, collections, math, itertools | |
def get_comb_exp_for_number_v32_clean(for_number, numbers, wo_dupl=False, more=False, debug=False): | |
""" v3.2 Clean version | |
wo_dupl - Returns right expressions without duplicates (9.*2./1.-8. = 2.*9./1.-8.) | |
more - Returns detailed statistics | |
debug - Returns right expressions and print detailed statistics | |
""" |
######## Variant 1 ######## | |
# using struct: https://docs.python.org/2/library/struct.html | |
import struct | |
def hex2rgb(rgb): | |
return struct.unpack('BBB', rgb.decode('hex')) | |
def rgb2hex(rgb): | |
return struct.pack('BBB',*rgb).encode('hex') |
// ==UserScript== | |
// @name _Fix lock selection text [allsites] | |
// @version 1.3 | |
// @description fix blocking selection on all sites | |
// @author Vyachesl Vasiliev | |
// @include * | |
// @downloadURL https://gist.githubusercontent.com/vyach-vasiliev/8dfb5f5b3c22e1fc74da180f00685929/raw | |
// @updateURL https://gist.githubusercontent.com/vyach-vasiliev/8dfb5f5b3c22e1fc74da180f00685929/raw | |
// @copyright © MIT, 2017, Vyacheslav Vasiliev | |
// @grant none |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import os, re | |
from grit.format import data_pack | |
def to_patch(patch_rules): | |
""" Patch for resources.pak file into part of Chrome browser | |
patch_rules - Dictionary with meanings | |
input_file - Path to input file (creates a backup) |
from win32com.shell import shell, shellcon | |
def get_startup_directory(common): | |
""" | |
Copyright Tim Golden <[email protected]> 25th November 2003 - 2012 | |
Licensed under the (GPL-compatible) MIT License: | |
http://www.opensource.org/licenses/mit-license.php | |
""" | |
return shell.SHGetFolderPath(0, (shellcon.CSIDL_STARTUP, shellcon.CSIDL_COMMON_STARTUP)[common], None, 0) | |
get_startup_directory(0) # 'C:\\Users\\<USERNAME>\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup' | |
get_startup_directory(1) # 'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup' |
function storage2json(storage){ | |
/* storage2json, v1.5, Copytight 2017, MIT License, Vyach.Vasiliev | |
The MIT License | |
Copyright (c) 2017 Vyacheslav Vasiliev (vyach.vasiliev\аt\gmail\dоt\com) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |