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
| clear | |
| # FTP Server Variables | |
| $FTPHost = 'ftp://192.168.1.1/html/' | |
| $FTPUser = 'user' | |
| $FTPPass = 'password' | |
| #Directory where to find pictures to upload | |
| $UploadFolder = "C:\Temp\" | |
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 axios from 'axios' | |
| function httpRequest (method, url, request) { | |
| return axios[method](url, request) | |
| .then(response => Promise.resolve(response)) | |
| .catch(error => Promise.reject(error)) | |
| } | |
| export default { | |
| get (url, request) { |
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
| # Redis Cheatsheet | |
| # All the commands you need to know | |
| redis-server /path/redis.conf # start redis with the related configuration file | |
| redis-cli # opens a redis prompt | |
| # Strings. |
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
| sudo amazon-linux-extras install epel -y | |
| sudo yum install stress -y |
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
| #!/bin/bash | |
| yum update -y | |
| yum install -y httpd | |
| instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
| echo "<h1>Hello World from $instanceId</h1>" > /var/www/html/index.html | |
| systemctl start httpd | |
| systemctl enable httpd |
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
| /* | |
| * Tiny tokenizer | |
| * | |
| * - Accepts a subject string and an object of regular expressions for parsing | |
| * - Returns an array of token objects | |
| * | |
| * tokenize('this is text.', { word:/\w+/, whitespace:/\s+/, punctuation:/[^\w\s]/ }, 'invalid'); | |
| * result => [{ token="this", type="word" },{ token=" ", type="whitespace" }, Object { token="is", type="word" }, ... ] | |
| * | |
| */ |
OlderNewer