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
| MS4wMzZ8fDEzNzkyNDc0NTk2ODB8MTExMTExfDEwMDEyMjY3MjMzNzk5OzIzOTQyNzAwODU0Nzc2OzEyMDE3OTY7OTsxMjUzMTk2NzE0OTA1MTsxMjU7LTE7LTE7MDszOzA7 | |
| MDswOy0xfDE1OSwxNTksNDE0MTU0NjY3MTcsMDsyNTYsMjU3LDE3MjU2ODcwNjU3MywwOzEwNCwxMDQsMTEyNTE4NTk1LDA7OTEsOTEsNTExNTcxODU2LDA7ODMsODMsMTM2 | |
| MzU1NzExMCwwOzczLDczLDMwNDM1MTc2NzksMDs2Miw2Miw5NzM2MDQ3NjMzLDA7NzMsNzMsMTY4NjA2MDk3Mzg1LDA7NTIsNTIsNzYzNTI2Njg2Mzg1LDA7MzgsMzgsMjM4 | |
| MzczMDQ1MzY4MywwO3w0NTAzNTk5NjI3MzcwNDk1OzQ1MDMxODczMTA1MTAwNzk7MzM3NzY5OTcyMDUyNjQ2MzszOTQwNjUyNDkyNTMyMjIzOzU2ODIyM3wzOTQwMDk3OTA0 | |
| ODY5Mzc1OzkwOTI3MTMwNjgyNTE%3D%21END%21 |
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/sh | |
| cat $1 > /dev/clipboard |
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 | |
| curl -o - https://www.stackage.org/download/snapshots.json | jq "." | |
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 | |
| NAME=$1 | |
| DIR=$2 | |
| if [ "$NAME" != "" -a "$DIR" != "" ]; then | |
| set -m | |
| docker pull siphilia/apache-php | |
| docker run --rm --name $NAME -v $DIR:/var/www/html siphilia/apache-php & | |
| sleep 3 | |
| echo "### Server IPv4 address ###" |
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 Combinations where | |
| -- | リスト要素n個の組み合わせの生成。O(n^m) | |
| combinations :: Int -> [a] -> [[a]] | |
| combinations 0 = const [] | |
| combinations 1 = map (:[]) | |
| combinations n = concatMap (\(x:xs) -> map (x:) $ combinations (n-1) xs) . takeWhile ((>=n) . length) . iterate (drop 1) |
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 -eu | |
| if [ $# -gt 0 ]; then | |
| docker inspect -f '{{ .NetworkSettings.IPAddress }}' $1 | |
| else | |
| echo "Usage: docker-ip CONTAINER_NAME|CONTAINER_ID" | |
| fi |
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 -eu | |
| docker run --rm gliderlabs/alpine:3.3 ip route get 8.8.8.8 | grep -oP "(?<=via )([\d\.]+)" |
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 -eu | |
| AUTO_START_DIR=${HOME}/.config/autostart | |
| KEYRING_CONFIG=gnome-keyring-ssh.desktop | |
| if [ ! -d $AUTO_START_DIR ]; then | |
| mkdir -p $AUTO_START_DIR | |
| fi | |
| if [ ! -e ${AUTO_START_DIR}/${KEYRING_CONFIG} ]; then |
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
| root = true | |
| [*] | |
| indent_style = space | |
| indent_size = 4 | |
| end_of_line = lf | |
| charset = utf-8 | |
| trim_trailing_whitespace = true | |
| insert_final_newline = true |
OlderNewer