Skip to content

Instantly share code, notes, and snippets.

$ sudo tmutil listbackups
$ sudo tmutil uniquesize "/Volumes/Time Machine/Backups.backupdb/YOUR_MACHINE_NAME/BACKUP_NAME"
$ sudo tmutil calculatedrift "/Volumes/Time Machine/Backups.backupdb/YOUR_MACHINE_NAME/"

@crowjdh
crowjdh / THINGS_I'V_LEARNED.md
Last active January 15, 2020 08:29
This may contain numerous errors. DO NOT treat this article as a reliable source of learning.

Ethereum

Overview

  • Blockchain
    • What it is: Hash-based growing list of blocks, commonly implemented using merkle-tree
    • Why: Data integrity, no double-spending, no central point of failure
    • How: Using public-private cryptography. Using public key as an identity of asset owner and private key as a proof of ownership(right to do action on the asset)
  • EVM
    • Public blockchain-based distributed computing platform using smart contract.
  • Solidity and smart contract
# Check connection status
$ nmcli d
# Edit network setting via tui
$ nmtui
# Restart network service
$ service network restart
$ usermod -aG GROUP_NAME USER_NAME
@crowjdh
crowjdh / Troubleshooting_IstanbulJS.md
Created October 27, 2019 14:43
Things to try when IstanbulJS is not working(zero coverage)

Things to try when it's not working(npm run coverage):

  • Try removing node_modules and .nyc_output directory and run npm install
  • Use different version of binaries
    • NodeJS version: v12.13.0
    • NPM version: 6.12.0
    • NPX version: 6.12.0
  • Add --exit option to MochaJS
  • Add cache option to .nycrc file
$ ffmpeg -i input.h264 -c:v libx264 -c:a copy output.mp4

Volume

OVPN_DATA="openvpn-data"
docker volume create --name $OVPN_DATA

Server

docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm mjenz/rpi-openvpn ovpn_genconfig -u udp://your.vpnhost.com

Symptom:

# sqlplus
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

Solution:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib

connect to core db from db host as sysdba:

  • without need of password: sqlplus / as sysdba
  • password manually: sqlplus sys as sysdba
  • password in command: sqlplus sys/Pass1234 as sysdba

connect to core db from db host or remote as sysdba:

  • password manually: sqlplus sys@\"1.2.3.4:1521/orcl\" as sysdba
  • password in command: sqlplus sys/Pass1234@1.2.3.4:1521/orcl as sysdba

connect to pdb from db host or remote as sysdba: