graph TD
subgraph EC2
subgraph Network and Security
secGroup(Security Group)
inboundRules(Inbound rules)
end
subgraph Load Balancing
loadBalancers(Load Balancers)
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
iex(134)> m=String;for x<-0..10,y=x<1&&"*"||x>9&&"H"||"0",z=1<x&&x<10&& m.rjust("0",x-1,?0)||"",do: IO.puts m.rjust(z,8)<>y<>z | |
* | |
0 | |
000 | |
00000 | |
0000000 | |
000000000 | |
00000000000 | |
0000000000000 | |
000000000000000 |
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
module Bootstrap.Examples.Signin exposing (..) | |
import Html exposing (Html, node, label, h2, text) | |
import Html.Attributes exposing (rel, href, class, for, required, autofocus, type_) | |
import Html.Events exposing (onCheck, onInput, onSubmit) | |
import Bootstrap.Grid as Grid | |
import Bootstrap.Form as Form | |
import Bootstrap.Form.Checkbox as Checkbox | |
import Bootstrap.Form.Input as Input | |
import Bootstrap.Button as Button |
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
# Setup IIS 7.5 as proxy for Kibana | |
# Note: requires server.basePath in Kibana config to be '/kibana' | |
# Set up Kibana server as a server farm | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /+"[name='kibana']" /commit:apphost | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /+"[name='kibana'].[address='localhost']" /commit:apphost | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /[name='kibana'].[address='localhost'].applicationRequestRouting.httpPort:"5601" /commit:apphost | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /[name='kibana'].[address='localhost'].applicationRequestRouting.httpsPort:"5643" /commit:apphost | |
# Set up routing rules |
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
# Setup IIS 7.5 as proxy for Cerebro | |
# Note: requires basePath in Cerebro config to be '/cerebro/' | |
# Set up Cerebro server as a server farm | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /+"[name='cerebro-farm']" /commit:apphost | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /+"[name='cerebro-farm'].[address='localhost']" /commit:apphost | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /[name='cerebro-farm'].[address='localhost'].applicationRequestRouting.httpPort:"9000" /commit:apphost | |
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /[name='cerebro-farm'].[address='localhost'].applicationRequestRouting.httpsPort:"9443" /commit:apphost | |
# Set up routing rules |
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
// open https://freedomhouse.org/report/countries-world-freedom-2019 | |
// run in Chrome console and then `copy(arr)` | |
let arr = []; | |
for (tr of document.getElementsByTagName('tbody')[0].getElementsByTagName('tr')) { | |
tds = tr.getElementsByTagName('td'); | |
let isTerritory = tds[1].getElementsByTagName('a')[0].innerText.endsWith('*'); | |
let name = tds[1].getElementsByTagName('a')[0].innerText; | |
arr.push( | |
{ | |
url: tds[1].getElementsByTagName('a')[0].href, |
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
console.log([...document.getElementsByTagName('table')] | |
//AVANZA | |
.filter(t => t.caption && (t.caption.innerText.toLowerCase().includes("fonder") || t.caption.innerText.includes("Certifikat"))) | |
.map(t => [...t.getElementsByTagName('tbody')] | |
.map(tb => [...tb.getElementsByTagName('tr')] | |
.map(tr => | |
(tr.cells[2].innerText.replace(/Superräntan\s?$/,"") | |
+ `\t` + tr.cells[8].innerText.replace(/\s/g,"") | |
+ "\t" + tr.cells[3].innerText)))) | |
.reduce((acc, e) => e[0].concat(acc).join("\n") |
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
[...document.getElementsByTagName('div')] | |
// NORDNET | |
.filter(e => e.getAttribute('role') === 'row') | |
.filter(e => !e.getAttribute('class').match('HeaderRow__|FooterRow__')) | |
.map(r => [...r.children]) | |
.map(cells => cells[1].innerText + '\t' + cells[8].innerText.replace(/\s/, '') + '\t' + cells[3].innerText) | |
.join("\n") + "\nCash\t" + [...document.getElementsByTagName('h2')] | |
.filter((e) => e.innerText === "Tillgängligt för handel")[0] | |
.parentNode.parentNode.childNodes[1].getElementsByTagName('span')[1].textContent.replace(/(\s|SEK)/g,""); |
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/zsh | |
for file in *.JPG; do | |
before=`GetFileInfo -d $file` | |
touch -mt `exiftool -s -s -s -d "%Y%m%d%H%M.%S" -DateTimeOriginal $file` $file; | |
var=$(exiftool -s -s -s -d "%m/%d/%Y %H:%M:%S" -DateTimeOriginal $file) | |
SetFile -d "$var" $file; | |
dir=$(exiftool -s -s -s -d "%Y/%m" -DateTimeOriginal $file) | |
echo "$dir/$file : $before --> `GetFileInfo -d $file`" | |
mkdir -p "$dir" | |
mv -n $file ./$dir/$file |
OlderNewer