Encrypt
openssl enc -aes-256-cbc -in [input] -out [output]
Decrypt
openssl enc -aes-256-cbc -d -in [input] > [output]
<?php | |
// https://github.com/madnh/hanhchinhvn/tree/master/dist | |
$result = []; | |
$data = json_decode(file_get_contents('tree.json'), true); | |
foreach ($data as $a => $province) { | |
$p = []; | |
foreach ($province['quan-huyen'] as $b => $district) { | |
$d = []; | |
foreach ($district['xa-phuong'] as $c => $ward) { |
#!/usr/bin/env python | |
# | |
# Very simple Python script to dump all emails in an IMAP folder to files. | |
# This code is released into the public domain. | |
# | |
# RKI Nov 2013 | |
# | |
import sys | |
import imaplib | |
import getpass |
Encrypt
openssl enc -aes-256-cbc -in [input] -out [output]
Decrypt
openssl enc -aes-256-cbc -d -in [input] > [output]
sudo add-apt-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install php7.1-bz2 php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-fpm php7.1-gd php7.1-imap php7.1-intl php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-opcache php7.1-readline php7.1-soap php7.1-sqlite3 php7.1-xml php7.1-xmlrpc php7.1-xsl php7.1-zip |
#! /bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt -y update | |
sudo apt install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt -y update | |
sudo apt purge lxc-docker | |
sudo apt-cache policy docker-engine | |
sudo apt -y install linux-image-extra-$(uname -r) linux-image-extra-virtual |
ESC,normal mode | |
`,[motion] go to mark point | |
~,[command] toggle case | |
!,[operator] external filter | |
@,[command] play a macro | |
#,[motion] previous indent | |
$,[motion] end of line | |
%,[motion] go to match open/close symbol | |
^,[motion] "soft" begin of line - first char not blank space | |
&,[command] repeat :s (:s search and replace in current line) |
#!/bin/sh | |
sudo sed -i "s/IPV6=yes/IPV6=no/" /etc/default/ufw | |
sudo ufw default deny incoming | |
sudo ufw default allow outgoing | |
sudo ufw allow 22/tcp | |
sudo ufw --force enable | |
sudo ufw reload | |
sudo sed -i "s/.*PasswordAuthentication .*/PasswordAuthentication no/" /etc/ssh/sshd_config |
var links = $$('._42ft._42fu._4-s1._2agf._p._42gx');
var i = 0;
unlike_all = function () {
links[i].click();
FROM mysql:5.7 | |
# Remove mysql_ssl_rsa_setup to ignore setup SSL certs | |
RUN rm -f /usr/bin/mysql_ssl_rsa_setup |