command to make SHA512 password hash from stdin as crypt(3).
-s: specifying salt.-c: checking specified hash is valid for stdin.
unix-crypt: unix-crypt-sha512.rb depends on it. To install, dogen install unix-crypt.
| import currying | |
| proc f(x, y: int) : int {.curried.} = | |
| return x + y | |
| doAssert (f(40) 2) == 42 | |
| doAssert (40.f 2) == 42 | |
| doAssert (40.f(2)) == 42 | |
| echo "Succeed" |
| import strutils, sequtils | |
| let | |
| abc = stdin.readline.split({' '}).map(parseInt) | |
| a = abc[0] | |
| b = abc[1] | |
| c = abc[2] | |
| if (a < c and c < b) or (b < c and c < a): | |
| echo "Yes" |
| import strutils, sequtils | |
| let | |
| s = stdin.readline.split({' '}) | |
| var | |
| sum = 0 | |
| a = s[0].parseInt | |
| b = s[1].parseInt |
| #ThisScriptIsWrittenInPython2.7.WhenYouExecute,PleaseDoInPython2.7.NoteThatItDoesNotWorkInPython3.x. | |
| W=" "; | |
| U="_"; | |
| D='"'*3; | |
| Q="'"*3; | |
| S="<"; | |
| L="&"; | |
| T=">"; | |
| # スクリプトの実態 |
| #ThisScriptIsWrittenInPython2.7.WhenYouExecute,PleaseDoInPython2.7.NoteThatItDoesNotWorkInPython3.x. | |
| W=" ";U="_";D='"'*3;Q="'"*3;S="<";L="&";T=">";zc=r"""import<re,random,zlib,base64&f=['eNrtld0JgDAMhI | |
| e 5wb L/FgqC9pI 0ptGK D | |
| w 0I5 UL5zG+BZ WmT3e 6 | |
| UxViMxZjLsEbO44DzRH6Sz O8d QsC4LtJ3eaykIOKq 5KBY0 QbQRk CSYUT1IPlkqOu+pBE9hg0a | |
| Thp8SXTz9BkIGT0JuiMmxM ENE c+HWw8EydcVlntGs a/ Il5jz wnz4mQ13yeicc+C1rZOQnq | |
| 28MQYmM+qLO82QbxiYzHjy xCU Z7z+jf7ENVaI+Qw= =','eNr dlkES gDAIAx/Th+X/v3Cc8dCGQN | |
| GBHuRYq1tLCIzxk8Ad/qM6 Bk4 wcIKBEwycYKCZodV VzJCQao aClDM EpJ5hIQ0MA+lgMKSFQZAeh | |
| iU69Zq9U1kYfHWZH37LYA3 4XW YV5CuGfHfjmbsOpE sPqW+Yj c/qnr HYS3wXtNEcyGfMPslysuF8 | |
| d+OFs+HnGEOr0bdC0x0TtS jV6 DuhaPNRPpTG+PTRw DCfKEas 6WUlh JOPU/JybUrhks1wThROhmj |
| import tables | |
| type | |
| CT = Table[string, int] | |
| proc makeConstTable(): CT = | |
| result = initTable[string, int]() | |
| result.add("one", 1) | |
| result.add("two", 2) | |
| result.add("three", 3) |
| #!/bin/bash | |
| CMD_LINE="ro root=/dev/example1,/dev/example2 splash quiet" | |
| for CMD_PARAM in ${CMD_LINE}; do | |
| case ${CMD_PARAM} in | |
| root=*) | |
| ROOT_DEV=${CMD_PARAM#root=} | |
| ;; | |
| *) |
| import strutils | |
| import sequtils | |
| var | |
| a = stdin.readline.parseInt | |
| bc = stdin.readline.split.map(parseInt) | |
| str = stdin.readline | |
| echo "$1 $2" % [$(a + bc[0] + bc[1]), str] |
| #!/bin/sh | |
| # | |
| # Read-only Root-FS for Raspian | |
| # | |
| # Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with | |
| # overlayfs integrated in Linux Kernel >= 3.18. | |
| # | |
| # Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10. | |
| # This version can be found here: | |
| # https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs |