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
| const fs = require('fs'); | |
| const os = require('os'); | |
| const path = require('path'); | |
| const cluster = require('cluster'); | |
| const lockFile = require('lockfile'); | |
| const filePath = path.resolve(__dirname, 'result.json'); | |
| const lockPath = path.resolve(__dirname, 'result.json.lock'); |
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 | |
| # Change Git remote url for all directories in current path | |
| old_org="git@github.com:old-organisation" | |
| new_org="git@github.com:new-organisation" | |
| for d in ./*; do | |
| echo "$d" | |
| if [ -d "$d" ]; then | |
| cd "$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
| curl "https://api.github.com/orgs/br-data/repos?page=1&per_page=100" | | |
| grep -e 'git_url*' | | |
| cut -d \" -f 4 | | |
| xargs -L1 git clone |
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
| mogrify -strip -resize 100x100 -interlace Plane -quality 85% -path . *.jpg |
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
| =TRIM(RIGHT(SUBSTITUTE(A1;"/";REPT(" ";100));100)) |
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 | |
| while IFS='' read -r line || [[ -n "$line" ]]; do | |
| sleep $(( ( RANDOM % 1 ) + 1 )) | |
| echo "$line" | |
| done < "$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 | |
| sum=0 | |
| if [ "$1" != "" ] | |
| then | |
| dir=$1 | |
| else | |
| dir=. | |
| 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
| =CHAR((ROW(A1)-1)/26+97)&CHAR(MOD(ROW(A1)-1;26)+97) |
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
| <form action="search"> | |
| <fieldset> | |
| <legend>Search string</legend> | |
| <input type="search" name="query" value="" placeholder="Enter text"> | |
| </fieldset> | |
| <fieldset> | |
| <legend>Search for</legend> | |
| <input type="radio" name="type" value="name" checked="checked"> |