A set of snippets I use in Laravel Nova
cd ./nova
yarn
mv webpack.mix.js.dist webpack.mix.js
<?php | |
// mirror list | |
$mirror_list = [ | |
'cdnetworks' => 'http://centos.mirror.cdnetworks.com/$releasever/os/$basearch/', | |
'naver' => 'http://mirror.navercorp.com/centos/$releasever/os/$basearch/', | |
'kakao' => 'http://mirror.kakao.com/centos/$releasever/os/$basearch/', | |
]; | |
// root 가 아니면 현재 폴더에 생성 |
#!/bin/bash | |
## nginx | |
NGINX=nginx-1.19.4.tar.gz | |
if [ ! -f "${NGINX}" ];then | |
wget https://nginx.org/download/${NGINX} | |
fi | |
ND=$(basename $NGINX .tar.gz) |
#!/bin/bash | |
function usage { | |
echo "USAGE: $0 -z ZONE -i BLOCK-IP1,BLOCK-IP2" | |
echo "" | |
echo "$0 -z dmz -i block-ip1,block-ip2" | |
echo "$0 -z dmz -f block-ip-file" | |
exit 1 | |
} |
#!/bin/sh | |
if [ "$#" -lt 1 ]; then | |
echo -e "$# is Illegal number of parameters.\n" | |
echo -e "Usage: $0 confluence-installed-dir\n" | |
echo "Example: $0 /var/atlassian/atlassian-confluence-6.7.0" | |
exit 1 | |
fi | |
CONF_DIR=$1 |
#!/bin/sh | |
JDK_VER=jdk1.8 | |
JDK_PATH=/usr/java/${JDK_VER} | |
# 새로운 심볼릭 링크를 생성한다. 설치한 JDK 의 버전이 다르면 JDK 디렉터리명을 수정한다. | |
ln -s /usr/java/jdk1.8.0_161 ${JDK_PATH} | |
### 기존 심볼릭 링크를 삭제한다. |
package bitcoin; | |
import static java.lang.Math.exp; | |
import static java.lang.Math.pow; | |
public class AttackerSuccessProbability { | |
public static double AttackerSuccessProbability(double q, int z) | |
{ | |
// p = probability an honest node finds the next block |
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
/etc/ssh/sshd_config
file by running the command sudo vi /etc/ssh/sshd_config
and do the following
Port
to 2222 (or any other port above 1000)PasswordAuthentication
to yes. This can be changed back to no if ssh keys are setup.sudo service ssh --full-restart
<?php | |
namespace Tests\Concerns; | |
use App\Models\User; | |
use Tymon\JWTAuth\Facades\JWTAuth; | |
trait AttachJwtToken | |
{ | |
/** |
<?php | |
/* | |
spring bean configuration needed p:defaultEncoding="UTF-8" | |
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource" | |
p:cacheSeconds="5" | |
p:defaultEncoding="UTF-8" | |
p:basenames="/WEB-INF/message/" /> | |
*/ |