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
#!/usr/bin/env bash | |
SL=/etc/apt/sources.list | |
PARAM="r:hm:dnak" | |
KAKAO=mirror.kakao.com | |
KAIST=ftp.kaist.ac.kr | |
HARU=ftp.harukasan.org |
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
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
public class HMacTest { | |
public static final String ALGORITHM = "HmacSHA256"; | |
public static String calculateHMac(String key, String data) throws Exception { | |
Mac sha256_HMAC = Mac.getInstance(ALGORITHM); |
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 | |
$url = 'http://google.com'; | |
if ($argc > 1){ | |
$url = $argv[1]; | |
} | |
$ch=curl_init(); | |
// user credencial |
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
#!/usr/bin/env php | |
<?php | |
## http://stackoverflow.com/questions/4356289/php-random-string-generator | |
function generateRandomString($length = 10) | |
{ | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$charactersLength = strlen($characters); | |
$randomString = ''; |
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
#!/usr/bin/env bash | |
BASE_REPOS=/etc/yum.repos.d/CentOS-Linux-BaseOS.repo | |
PARAM="r:hkn" | |
KAKAO="mirror.kakao.com\/centos" | |
NAVER="mirror.navercorp.com\/centos" | |
if [ "$(id -u)" != "0" ]; then | |
echo "'$0' must be run as root" 1>&2 |
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 | |
## nginx | |
NGINX=nginx-1.19.4.tar.gz | |
if [ ! -f "${NGINX}" ];then | |
wget https://nginx.org/download/${NGINX} | |
fi | |
ND=$(basename $NGINX .tar.gz) |
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
## copy from https://gist.github.com/cdekkerpossibilit/d023602c29fdf039c7eabadf64f708e9 | |
function Confirm-Choice { | |
param ( | |
[string]$Message | |
) | |
$yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes","Yes"; | |
$no = new-Object System.Management.Automation.Host.ChoiceDescription "&No","No"; | |
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no); | |
$answer = $host.ui.PromptForChoice("", $message, $choices, 1) | |
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
includes: | |
- ./vendor/nunomaduro/larastan/extension.neon | |
parameters: | |
paths: | |
- app | |
# The level 8 is the highest level | |
level: 5 |
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 | |
sudo yum install gcc -y | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make MALLOC=libc |
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
// This file was initially generated by Windows Terminal 0.11.1191.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
NewerOlder