fallocate -l 2G /path/to/file.img
zpool create poolname /path/to/file.img
zpool set autoexpand=on poolname
truncate --size=+1G /path/to/file.img
zpool online -e poolname /path/to/file.img
zfs create poolname/filesystemname
zfs set mountpoint=/path/to/mountpoint poolname/filesystemname
zfs set compression=on poolname/filesystemname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expdp \"SYS/inwaveseguros@//srvsegoda-scan:1521/ecommci AS SYSDBA\" schemas=atgcore_ci dumpfile=atgcore_ci.dmp logfile=atgcore_ci.log | |
impdp \"SYS/inwaveseguros@//srvsegoda-scan:1521/ecommci AS SYSDBA\" schemas=atgcore_ci dumpfile=atgcore_ci.dmp logfile=atgcore_ci_import.log remap_schema=atgcore_ci:atgcore_ci_test | |
ALTER USER smithj IDENTIFIED BY autumn; -- senha eh sem aspas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################################################## | |
# Script: sid | |
# | |
# Description: | |
# This script sets ORACLE_SID and ORACLE_HOME environment variables | |
# in case multiple ORACLE_HOME is shared by a single user. | |
# | |
# Usage: | |
# $ chmod +x ./sid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## This will only work on Ubuntu 16.04 and up | |
DEVNAME=/dev/xvdg | |
# Install ZFS if we don't have it | |
if [[ -z $(which zfs) ]]; then | |
apt -y update | |
apt -y install zfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- text -*- | |
# | |
# $Id$ | |
# Compares the a token generated with a token seed with the User-Password (TOTP) | |
exec oath { | |
# wait for the program | |
wait = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.internet.protocol import ReconnectingClientFactory | |
from autobahn.twisted.websocket import WebSocketClientProtocol, WebSocketClientFactory | |
import json | |
import subprocess | |
server = "127.0.0.1" # Server IP Address or domain eg: tabvn.com | |
port = 3001 # Server Port | |
streaming_process = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install mp4box | |
brew install ffmpeg --with-fdk-aac --with-tools --with-freetype --with-libass --with-libvorbis --with-libvpx --with-x265 --HEAD | |
ffmpeg -i input.mov -c:v libx265 -c:a aac -preset ultrafast -an -x265-params crf=25 video.mp4 | |
ffmpeg -i input.mov -c:a libfdk_aac -profile:a aac_he_v2 audio.aac | |
mp4box -add audio.aac -add video.mp4 output.mp4 | |
ffmpeg -i output.mp4 -vcodec copy -acodec copy -tag:v hvc1 output_apple.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strace -p 1725 -o app_pid1725_trace.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LANGUAGE="en_US.UTF-8" | |
echo 'LANGUAGE="en_US.UTF-8"' >> /etc/default/locale | |
echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps --format "table {{.Size}}\t{{.Names}}\t{{.Image}}" -a |