This file contains hidden or 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 java.io.ByteArrayOutputStream; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import javax.xml.parsers.DocumentBuilderFactory; | |
| import javax.xml.transform.OutputKeys; | |
| import javax.xml.transform.Transformer; | |
| import javax.xml.transform.TransformerFactory; |
This file contains hidden or 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 java.io.ByteArrayOutputStream; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import javax.xml.parsers.DocumentBuilderFactory; | |
| import javax.xml.transform.OutputKeys; | |
| import javax.xml.transform.Transformer; | |
| import javax.xml.transform.TransformerFactory; |
This file contains hidden or 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 | |
| class LineNotify | |
| { | |
| const LINE_API = "https://notify-api.line.me/api/notify"; | |
| public static function sendMessage($token, $message) | |
| { | |
| $lineApi = self::LINE_API; | |
| $queryData = array('message' => $message); | |
| $queryData = http_build_query($queryData,'','&'); | |
This file contains hidden or 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
| package chemp.notes.linenotify; | |
| import java.io.*; | |
| import java.net.*; | |
| import java.util.regex.Pattern; | |
| public class LineNotify { | |
| private static final String strEndpoint = "https://notify-api.line.me/api/notify"; | |
| public boolean callEvent(String token, String message) { | |
| boolean result = false; |
This file contains hidden or 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
| ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| #If you want in PK8 (Can put it in java String) | |
| openssl pkcs8 -topk8 -in jwtRS256.key -nocrypt -out jwtRS256.pk8.key | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
This file contains hidden or 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
| /** | |
| * Example for use RSA encrypt https://github.com/jwtk/jjwt | |
| * set private key and public key to String variable | |
| * generated command below | |
| * ssh-keygen -t rsa -b 2048 -f jwtRS256.key | |
| * # Don't add passphrase | |
| * openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| * openssl pkcs8 -topk8 -in jwtRS256.key -nocrypt -out jwtRS256.pk8.key | |
| */ |
This file contains hidden or 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 numpy as np | |
| import tensorflow as tf | |
| # Suppress verbose output from TensorFlow | |
| import os | |
| os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' | |
| INPUT_XOR = np.array([[0,0],[0,1],[1,0],[1,1]]) | |
| OUTPUT_XOR = np.array([0,1,1,0]) |
This file contains hidden or 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 | |
| class AutoLoadingWorking extends Worker | |
| { | |
| public function run(){ | |
| } | |
| } | |
| class MyThread extends Thread |
This file contains hidden or 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
| #### 1.Create storage class | |
| #### storage.yaml | |
| kind: StorageClass | |
| apiVersion: storage.k8s.io/v1 | |
| metadata: | |
| name: ssd | |
| provisioner: kubernetes.io/gce-pd | |
| parameters: | |
| type: pd-ssd |
This file contains hidden or 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
| #If someone requests http://test.myserver.com/myapp, apache redirects it to port 4000/myapp. | |
| #And if http://test.myserver.com/ is requested, apache redirects it to port 3000. | |
| <VirtualHost *:80> | |
| ProxyPass "/myapp" "http://127.0.0.1:4000/myapp" | |
| ProxyPassReverse "/myapp" "http://127.0.0.1:4000/myapp" | |
| ProxyPassMatch ^/myapp ! | |
| ProxyPass "/" "http://127.0.0.1:3000/" |
OlderNewer