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 | |
| cd ~ | |
| git clone https://github.com/xuyuji9000/dotfile.git .dotfile | |
| source ~/.dotfile/setup.sh | |
| vim |
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 | |
| DATABASE="forward" | |
| mysqldump -u mysqlusernamehere -pmysqlpasswordhere $DATABASE > /mnt/mysql/full/$(date +"%d-%b-%Y")_$(echo $DATABASE).sql |
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 | |
| find ./ -mindepth 1 -mtime +30 -exec rm '{}' \; |
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 | |
| # install docker | |
| sudo apt-get update | |
| sudo apt-get install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common -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 | |
| sudo apt-get update | |
| sudo apt-get install redis-server |
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 | |
| cd ~ | |
| git clone https://github.com/xuyuji9000/dotfile.git .dotfile | |
| source ~/.dotfile/setup.sh | |
| vim |
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
| { | |
| "ResourceRecords": [ | |
| { | |
| "Value": "13.124.193.69" | |
| } | |
| ], | |
| "Type": "A", | |
| "Name": "swarm.yogiman.cn.", | |
| "TTL": 60 | |
| }, |
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 | |
| sudo apt-get update | |
| sudo apt-get install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common -y | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
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
| const reader = new FileReader() | |
| const file = this.uploadInput.files[0] | |
| let self = this | |
| reader.onload = function() | |
| { | |
| let target_data = '' | |
| const data_info = jschardet.detect(reader.result) | |
| if('ascii'==data_info.encoding && data_info.confidence > 0) | |
| target_data = this.result | |
| else |
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
| let _ = require('lodash') | |
| let thing = [ | |
| {"a": 123}, | |
| {"a": 456}, | |
| {"abc": 6789}, | |
| ] | |
| console.log(typeof(thing)) | |
| let result = _.filter(thing, function(element){ |