https://code.google.com/archive/p/json-simple/wikis/EncodingExamples.wiki
// import org.json.simple.JSONObject;
require 'openssl' | |
require 'base64' | |
def aes_128_ecbe key, data | |
cipher = OpenSSL::Cipher.new('AES-128-ECB') | |
cipher.encrypt # this needs to be called first to make encryption work for AES-128-ECB | |
cipher.key = key | |
cipher.padding = 1 |
package main | |
import ( | |
"bytes" | |
"encoding/csv" | |
"fmt" | |
) | |
func main() { | |
array := []string{"a s,dA", "Bdaf"} |
{"lastUpload":"2020-03-13T02:12:56.522Z","extensionVersion":"v3.4.3"} |
https://code.google.com/archive/p/json-simple/wikis/EncodingExamples.wiki
// import org.json.simple.JSONObject;
http://php.net/manual/en/security.hiding.php | |
So far I haven't seen a working rewriter of /foo/bar into /foo/bar.php, so I created my own. It does work in top-level directory AND subdirectories and it doesn't need hardcoding the RewriteBase. | |
.htaccess | |
RewriteEngine on | |
# Rewrite /foo/bar to /foo/bar.php | |
RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L] |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
svn update | |
=> | |
git stash && git pull && git stash pop --index |
wg https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-x64.tar.xz | |
unxz node-v6.10.2-linux-x64.tar.xz | |
tar -xf node-v6.10.2-linux-x64.tar | |
mkdir /usr/node | |
mv node-v6.10.2-linux-x64 /usr/node | |
ln -s /usr/node/node-v6.10.2-linux-x64 /usr/node/default | |
vi ~/.bash_profile | |
------------------------------------ |
# Use only one line eithor in bash script file or command line to display a digital clock. | |
# This line also shows in bash script | |
# - A example of endless loop | |
# - Assigning output of command to a variable | |
# - "-n" "-e" of echo command | |
# - "\r" is used to reset the current line output | |
while sleep 1; do o=$(date); echo -n -e "\r$o"; done |