Skip to content

Instantly share code, notes, and snippets.

@Sunappnio
Sunappnio / encrypt_openssl.txt
Created July 1, 2016 08:54 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL
For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt
For Asymmetric encryption you must first generate your private key and extract the public key.
@Sunappnio
Sunappnio / wxd.user.js
Last active March 8, 2016 03:18
(chrome)解决微信网页版使用中,若光标不在输入框,错按退格键导致页面回退,需要重新登录的问题
// ==UserScript==
// @name disable backspace key
// @author [email protected]
// @namespace https://claire.ml
// @description prevent web wechat from exit unexpectedly
// @include https://wx.qq.com*
// @run-at document-end
// ==/UserScript==
function forbidBackSpace(e) {
@Sunappnio
Sunappnio / v.user.js
Last active December 30, 2015 04:38
v2ex show real date
// ==UserScript==
// @name v2exdate
// @author [email protected]
// @namespace http://abc.com
// @description v2ex show real date
// @include http://www.v2ex.com/t/*
// @include http://v2ex.com/t/*
// @include https://www.v2ex.com/t/*
// @include https://v2ex.com/t/*
// @run-at document-end
@Sunappnio
Sunappnio / nginx.conf
Created December 17, 2015 06:37 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048