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 | |
# Requirement: uchardet | |
iconv -f `uchardet $1` -t utf8 -o "$1.new" "$1" | |
echo "Converting `uchardet $1` into UTF-8." | |
if [ "$?" -eq 0 ]; then | |
mv -f "$1.new" "$1" | |
else | |
echo "Wrong format!!" |
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 script will compile and install a static ffmpeg build with support for nvenc un ubuntu. | |
#See the prefix path and compile options if edits are needed to suit your needs. | |
#install required things from apt | |
installLibs(){ | |
echo "Installing prerequisites" | |
apt-get update | |
apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \ |
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
[Unit] | |
Description=OpenVPN Reverse Service | |
[Service] | |
EnvironmentFile=/etc/openvpn-reverse/%I.conf | |
ExecStart=/usr/bin/autossh -N -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 30" -R 127.0.0.1:${TARGET_INTERNAL_PORT}:${TARGET_IP}:${TARGET_PORT} ${REMOTE_USER}@${REMOTE_IP} | |
[Install] | |
WantedBy=multi-user.target |
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
let $__cP = nowPageNum; | |
function $__gNp() { | |
if ($__cP <= totalPageNum) { | |
opener.PageMove2019AfterVersion($__cP); | |
console.log(`${$__cP} 페이지를 수강완료했습니다.`); | |
$__cP += 1; | |
setTimeout(() => $__gNp(), 1000); | |
} else { | |
alert('강의 수강이 완료되었습니다!'); | |
} |
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 | |
# hevc_nvenc AVOptions (See https://gist.github.com/nico-lab/c2d192cbb793dfd241c1eafeb52a21c3 ) | |
" | |
-preset <int> E..V...... Set the encoding preset (from 0 to 18) (default p4) | |
default 0 E..V...... | |
slow 1 E..V...... hq 2 passes | |
medium 2 E..V...... hq 1 pass | |
fast 3 E..V...... hp 1 pass | |
hp 4 E..V...... |
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 | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. |
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
# | |
# tap-up.sh | |
# | |
#!/bin/bash | |
# TAP after-up script for OpenVPN TAP connection | |
# LimeOrangePie, 2021/06/15 | |
TAP=$1 | |
PERM_ADDR=02:c1:93:29:f1:5d # it's randomly generated TAP device MAC! |
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 pathlib import Path | |
import subprocess | |
import os | |
import stat | |
if __name__ == '__main__': | |
''' Fix SDK filesystem | |
author: JungIn An <ji5489@gmail.com> | |
CVMIPLab. |
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 argparse import ArgumentParser | |
import sys | |
import glob | |
import os | |
import xml.etree.ElementTree as ET | |
from functools import reduce | |
def parse_annotation(xml_filename): | |
objects = [] |
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 | |
ARG=$@ | |
TOP_FILE_SIZE=$(unzip -l $@ | head -n 4 | tail -n 1 | awk '{ print $1 }') | |
if [ "$TOP_FILE_SIZE" -eq "0" ]; then | |
echo "Top folder exists" | |
unzip "$ARG" -d . | |
else | |
echo "Top folder not exists" | |
FILENAME=$(echo $ARG | rev | cut -f 2- -d '.' | cut -f -1 -d '/' | rev) |
OlderNewer