Skip to content

Instantly share code, notes, and snippets.

@sethbergman
sethbergman / install-docker.sh
Last active April 17, 2025 19:57 — forked from dweldon/install-docker.sh
Install Docker CE on Linux Mint 19
#!/usr/bin/env bash
set -e
# https://docs.docker.com/engine/install/ubuntu/
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 2>/dev/null
sudo echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') bionic stable" > /etc/apt/sources.list.d/docker.list
sudo apt-get -y update
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@welefen
welefen / gist:7746175
Last active January 6, 2020 08:53
php判断文件编码和检测文件是否有UTF-8头信息
<?php
/**
* 获取内容的编码
* @param string $str
*/
function get_encoding($str = "") {
$encodings = array (
'ASCII',
'UTF-8',