This gist contains service descriptors which may be used to automatically start and re-start Minecraft servers using systemd. This allows proper control of your server startup on modern Linux distributions and will automatically manage all required tasks on startup for you.
Discover gists
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
<?php | |
/** | |
* Gera a paginação dos itens de um array ou collection. | |
* | |
* @param array|Collection $items | |
* @param int $perPage | |
* @param int $page | |
* @param array $options | |
* | |
* @return LengthAwarePaginator |
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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
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
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
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
% Some utils for paper writing | |
% Just add this file to your project folder and \input{writing_utils} in the main tex file | |
\usepackage{color} | |
\usepackage{background} | |
% During writing | |
\newcommand{\todo}[1]{{\color{orange} #1}} | |
\newcommand{\unsure}[2]{{\color{magenta} #1 }{\color{gray} #2}} % check information, move it, etc. | |
\newcommand{\highlight}[1]{\textbf{#1}} % Highlight important phrases, check if they are prominent enough |
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
#!/sbin/openrc-run | |
description="Start minecraft server" | |
command_user="minecraft:minecraft" | |
command="/usr/bin/java" | |
command_args="-Xmx1024M -Xms1024M -jar server.jar nogui" | |
pidfile=mine.pid | |
command_background=true | |
directory="/home/minecraft" |
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
%PDF-1.0 | |
1 0 obj | |
<< | |
/Type /Catalog | |
/Pages 2 0 R | |
/Names 6 0 R | |
>> | |
endobj |
- Pentium 以降の世代の CPU なら問題なく実行できる
- VC++ (2005 以降?) なら
<intrin.h>
を#include
して、__cpuid()
および__cpuidex()
を使用する - gcc なら
<cpuid.h>
を#include
して、__get_cpuid()
,__cpuid_count()
を使用する - RDRAND を使ってみたかったのだけど、うちのは対応していなかった!
Essentially just copy the existing video and audio stream as is into a new container, no funny business!
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.
NewerOlder