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
| alias celar='clear' # FU typo | |
| alias clr='clear' | |
| alias agi='sudo apt install' | |
| alias update='sudo apt update' | |
| alias upgrade='sudo apt upgrade -y' | |
| alias aptlist='apt list --upgradable' | |
| alias sizeof='du -hs ' | |
| alias gstat='git status' | |
| alias rscp="rsync --rsh='ssh' -av --progress --partial " # local_file user@host:remote_file (SRC DEST) | |
| alias rcp='rsync -azvrh --progress --partial' |
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 Vue from 'vue'; | |
| // Test : https://jsfiddle.net/brend/xe75nmdz/ | |
| // Note: https://github.com/vuejs/vue/issues/6201 | |
| const HOC = component => { | |
| const inheritedProps = (typeof component === 'function' ? component.options.props : component.props) || []; | |
| return Vue.component('HOC', { | |
| mounted() {}, | |
| data() { |
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
| fn main() { | |
| for i in 1..101 { | |
| let mut output = "".to_string(); | |
| if i % 3 == 0 { | |
| output = output + "Fizz"; | |
| }; | |
| if i % 5 == 0 { | |
| output = output + "Buzz"; | |
| }; | |
| if output == "" { |
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
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| server_name localhost; | |
| access_log off; | |
| error_log off; | |
| client_max_body_size 30M; | |
| location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm|json|otf|eot|svg|ttf|woff|woff2)$ { | |
| root /home/ubuntu/app/public; |
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
| for(var i=1;i<=100;i++){ | |
| var output = ""; | |
| if(i%3===0) output+="Fizz"; | |
| if(i%5===0) output+="Buzz"; | |
| if(output==="") output=i; | |
| console.log(output); | |
| } |
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
| location ~ \.(asp|aspx|php|jsp|cgi|cgii|pl|py|exe|dll|msi)$ { | |
| return 410; | |
| } | |
| location ~ /TWiki|WebHome|cgi-bin|portal|foswiki|spywall|setseed-hub|account/ig { | |
| return 410; | |
| } | |
| if ($http_user_agent ~* (BDNC)) { | |
| return 410; | |
| } |
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
| "use strict"; | |
| const assert = require("assert"); | |
| const crypto = require("crypto"); | |
| let server = crypto.createDiffieHellman(1024); | |
| let prime = server.getPrime(); | |
| console.log("Generate Alice's keys..."); | |
| let alice = crypto.createDiffieHellman(prime); | |
| let alicePublicKey = alice.generateKeys("base64"); |