Skip to content

Instantly share code, notes, and snippets.

View sergeevabc's full-sized avatar

Aleksandr Sergeev sergeevabc

View GitHub Profile
// ==UserScript==
// @name Remove tracking links on duckduckgo.com HTML version
// @namespace Violentmonkey Scripts
// @match https://html.duckduckgo.com/html/
// @grant none
// @version 1.0
// @author -
// @description 7/9/2023, 4:36:51 PM
// @run-at document-idle
// ==/UserScript==
@adulau
adulau / alt-to-gnupg.md
Last active February 17, 2024 13:46
Alternative to GnuPG/OpenPGP - including encryption at rest, file and backup

List of GnuPG/OpenPGP replacement (not OpenPGP compatible)

List of GnuPG replacement (OpenPGP compatible)

@blakecrosby
blakecrosby / gist:1731bcddec0897e1c23d
Created December 24, 2014 16:18
Best Traceroute Ever!
[bcrosby@infiniteloop ~]$ traceroute -m255 xmas.futile.net
traceroute to xmas.futile.net (77.75.106.106), 255 hops max, 60 byte packets
1 router2-nac.linode.com (207.99.1.14) 0.460 ms 0.569 ms 0.693 ms
2 207.99.53.45 (207.99.53.45) 0.243 ms 0.254 ms 0.286 ms
3 0.e1-1.tbr2.tl9.nac.net (209.123.10.78) 1.278 ms 1.260 ms 1.351 ms
4 0.e2-2.pr2.tl9.nac.net (209.123.11.146) 1.252 ms 1.331 ms 1.384 ms
5 xe-0-0-0-0.edge00.thn.uk.hso-group.net (195.66.224.226) 79.858 ms 79.847 ms 79.827 ms
6 xe-8-3.core00.thn.uk.hso-group.net (93.89.91.15) 83.115 ms 80.668 ms 80.683 ms
7 xe-4-4.core00.gs1.uk.hso-group.net (77.75.108.160) 88.337 ms 88.427 ms 86.697 ms
8 ae0-1203.edge00.sov.uk.hso-group.net (46.17.60.117) 82.199 ms 82.166 ms 82.122 ms
@devi
devi / blake2b.js
Created July 2, 2014 08:49
blake2b.js
(function(exports) {
'use strict';
// Blake2b
// Ported by Devi Mandiri. Public domain.
var u64 = function (h, l) {
h = h|0; l = l|0;
this.hi = h >>> 0;
@chrisveness
chrisveness / utf8-regex.js
Last active May 25, 2023 01:53
Utf8 string encode/decode using regular expressions
/**
* Encodes multi-byte Unicode string into utf-8 multiple single-byte characters
* (BMP / basic multilingual plane only).
*
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars.
*
* Can be achieved in JavaScript by unescape(encodeURIComponent(str)),
* but this approach may be useful in other languages.
*
* @param {string} unicodeString - Unicode string to be encoded as UTF-8.
@valerysntx
valerysntx / underscore.uuid.js
Last active December 17, 2015 13:49
client javascript uuid v4 and v5 generator. do not require additional libs. adopted from 'superscore' extensions by David Souther. http://davidsouther.github.com/superscore/ usage: var randomUUID = underscore.UUID.v4(); var uuidv5 = underscore.UUID.v5(msg,namespace);
var underscore = (function(underscore){
// Build several namespaces, globally...
var UUID = {};
var Sha1 = function(str){return Sha1.hash(str, true);};
var Utf8 = {};
var extend = function() {
var options, name, src, copy, copyIsArray, clone,
@devoncrouse
devoncrouse / clean_audio.sh
Created May 7, 2013 17:02
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@tzi
tzi / README.md
Created August 17, 2012 11:23
A #javascript #userscript: Fix redirect twitter link
@Fordi
Fordi / PHP's str_split for Javascript
Created July 1, 2011 23:55
Crock32: The Base32 implementation outlined by Douglas Crockford
Javascript str_split:
String.prototype.strSplit = function (n) {
return this.match(new RegExp('.{1,'+(n||1)+'}', 'g'));
}
@getify
getify / gist:713779
Created November 24, 2010 15:09
loading google analytics using LABjs
<!DOCTYPE html>
<html>
<head>
<title>LABjs Demo</title>
</head>
<body>
<!-- some stuff -->
<script src="/js/LAB.js"></script>