Skip to content

Instantly share code, notes, and snippets.

@gladiopeace
gladiopeace / oracle_tips.sh
Created February 8, 2018 08:24 — forked from fikani/oracle_tips.sh
ORACLE 11G
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
#!/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
@gladiopeace
gladiopeace / zfsbasics.md
Created February 8, 2018 08:32 — forked from flbuddymooreiv/zfsbasics.md
ZFS Basics
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
@gladiopeace
gladiopeace / zfs-for-docker.sh
Created February 8, 2018 08:49 — forked from ebr/zfs-for-docker.sh
ZFS zpool for docker
#!/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
# -*- text -*-
#
# $Id$
# Compares the a token generated with a token seed with the User-Password (TOTP)
exec oath {
# wait for the program
wait = yes
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
@gladiopeace
gladiopeace / h265-ffmpeg.sh
Created February 9, 2018 15:07 — forked from k06a/install-ffmpeg-with-h265.sh
H265 with ffmpeg
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
@gladiopeace
gladiopeace / strace_specific_pid.sh
Created February 16, 2018 00:31
trace specific pid out to file
strace -p 1725 -o app_pid1725_trace.txt
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
@gladiopeace
gladiopeace / docker_ps_readable.sh
Created February 17, 2018 16:43
docker formatted output
docker ps --format "table {{.Size}}\t{{.Names}}\t{{.Image}}" -a