Skip to content

Instantly share code, notes, and snippets.

View bvn13's full-sized avatar
👨‍💻
let's code

Vyacheslav N. Boyko bvn13

👨‍💻
let's code
View GitHub Profile
@bvn13
bvn13 / addEventListener-polyfill.js
Created July 27, 2016 10:24 — forked from eirikbacker/addEventListener-polyfill.js
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}
@bvn13
bvn13 / Symmetric.java
Created July 17, 2019 18:44 — forked from dwelch2344/Symmetric.java
A simple example of decrypting a symmetrically encrypted file (via GPG)
import org.apache.commons.io.FileUtils;
import org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags;
import org.bouncycastle.openpgp.*;
import org.bouncycastle.openpgp.examples.ByteArrayHandler;
import org.bouncycastle.openssl.PEMReader;
import org.bouncycastle.util.io.Streams;
import java.io.*;
import java.security.NoSuchProviderException;
import java.security.Security;
#!/bin/bash
#
# chkconfig: 2345 95 20
# description: Tomcat 8 start/stop/status init.d script
# processname: tomcat
#
# Tomcat 8 start/stop/status init.d script
#
# Updates:
# @author: Tongliang Liu <[email protected]>
@bvn13
bvn13 / README.MD
Created May 18, 2022 11:57 — forked from RichardBronosky/README.MD
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]