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 | |
ls | while read i | |
do | |
echo $i | |
# actions | |
done |
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
shuf -n 1 /usr/share/dict/words |
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
import random | |
# list of words | |
words = random.shuffle([w.strip() for w in open("/usr/share/dict/words").readlines()]) | |
# get word and remove it from list | |
word = words.pop() |
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
$ head -n 20 /usr/share/dict/words | |
A | |
A's | |
AA's | |
AB's | |
ABM's | |
AC's | |
ACTH's | |
AI's | |
AIDS's |
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
$ head -n 20 /usr/share/myspell/dicts/fa.dic | |
آب | |
آباد | |
آبادان | |
آبادانت | |
آبادانتان | |
آبادانش | |
آبادانشان | |
آبادانم | |
آبادانمان |
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 panel.hiweb.ir/panel.php 2>/dev/null | grep "400px.*warning" | \ | |
sed -e 's/<[^>]*>//g' | sed -e 's/اعتبار باقیمانده شما//g' | \ | |
sed -e 's/مگابایت/M/' | sed -e 's/گیگابایت/G/' | sed -e 's/^\s*//' | |
1.2 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/sh | |
curl panel.hiweb.ir/panel.php 2>/dev/null | grep "400px.*warning" | \ | |
sed -e 's/<[^>]*>//g' | sed -e 's/اعتبار باقیمانده شما//g' | \ | |
sed -e 's/مگابایت/M/' | sed -e 's/گیگابایت/G/' | sed -e 's/^\s*//' |
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 | |
curl panel.hiweb.ir/panel.php -X POST --data "user=USERNAME&pass=PASSWORD" 2>/dev/null | grep "400px.*warning" | \ | |
sed -e 's/<[^>]*>//g' | sed -e 's/اعتبار باقیمانده شما//g' | \ | |
sed -e 's/مگابایت/M/' | sed -e 's/گیگابایت/G/' | sed -e 's/^\s*//' |
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
#!/usr/bin/env bash | |
# apt-get install lame flac shnsplit cuetools | |
# create temp dir | |
rm -rf flac_to_mp3_tmp | |
mkdir -p flac_to_mp3_tmp | |
if [[ `ls *.flac | wc -l ` == 1 ]] | |
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
perl: warning: Setting locale failed. | |
perl: warning: Please check that your locale settings: | |
LANGUAGE = (unset), | |
LC_ALL = (unset), | |
LC_TIME = "fa_IR", | |
LC_MONETARY = "fa_IR", | |
LC_ADDRESS = "fa_IR", | |
LC_TELEPHONE = "fa_IR", | |
LC_NAME = "fa_IR", | |
LC_MEASUREMENT = "fa_IR", |