First set up your keyboard layout. For example, in Spanish:
# loadkeys es
For a list of all acceptable keymaps:
# localectl list-keymaps
| var CryptoJS = require("crypto-js");//replace thie with script tag in browser env | |
| //encrypt | |
| var rawStr = "hello world!"; | |
| var wordArray = CryptoJS.enc.Utf8.parse(rawStr); | |
| var base64 = CryptoJS.enc.Base64.stringify(wordArray); | |
| console.log('encrypted:', base64); | |
| //decrypt | |
| var parsedWordArray = CryptoJS.enc.Base64.parse(base64); |
| <?php | |
| /* | |
| We want to display a lot of information to the screen = download a lot of HTML = lag. | |
| LEt's go for a pagination ! | |
| */ | |
| // Huge array with lot of dbig datas. | |
| $my_huge_array = array(); | |
| // Setting up pagination |
| scan target for pentest | |
| nmap -PN -n -A -sS -p- -oN output.nmap <IP> | |
| -Pn : no ping check (host is up), | |
| -n no dns resolution | |
| -A : detect systeme info | |
| -sT : tcp connect [laisse des traces dans les logs serveurs] (moins impactant que -sS Syn, ne laisse pas de trace dans les logs par defaut) | |
| -p- : port de 0-65535 | |
| -oN output.nmap : write utput to file | |
| ajouter un scan udp en parallèle -sU (dns, ipsec ...) |
| <?php | |
| /** | |
| * Get all values from specific key in a multidimensional array | |
| * | |
| * @param string $key key(s) of value you wish to extract | |
| * @param array $arr where you want | |
| * | |
| * @return null|string|array | |
| */ |
| <?php | |
| $array = array( | |
| 'key1' => 'value1', | |
| 'key2' => 'value2', | |
| 'key3' => 'value3', | |
| ); | |
| $flattened = $array; | |
| array_walk($flattened, function(&$value, $key) { | |
| $value = "{$key} ({$value})"; | |
| }); |
| #!/bin/bash | |
| APIKEY="From Here https://api.slack.com/custom-integrations/legacy-tokens" | |
| SONG=$(osascript -e 'tell application "Spotify" to name of current track as string') | |
| URLSONG=$(echo "$SONG" | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"') | |
| while true | |
| do | |
| curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22"$URLSONG"%22%2C%22status_emoji%22%3A%22%3Amusical_note%3A%22%7D" > /dev/null | |
| sleep 60 | |
| done |
Cloud Build is a product of GCP (Google Cloud Platform) used to build software quickly across all languages.
Function:
| # | |
| # This is the ultimate HAProxy 2.0 "Getting Started" config | |
| # It demonstrates many of the features available which are now available | |
| # While you may not need all of these things, this can serve | |
| # as a reference for your own configurations. | |
| # | |
| # Have questions? Check out our community Slack: | |
| # https://slack.haproxy.org/ | |
| # |
| <? foreach(range(1, 10) as $i) echo $i * 2 . " "; |