This file contains 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
cat file_with_numbers.txt | awk '{a=+$1}END{print a}' |
This file contains 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
hadoop fs -count /path/to/shit | awk '{print $6 / $1 *100 }' |
This file contains 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
puts "hello world".capitalize |
This file contains 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 | |
if test "$RS_REBOOT" = "true" ; then | |
echo "Skip Example script on reboot." | |
logger -t BaseServerConfigScript "Skipping on reboot." | |
exit 0 | |
fi | |
rm -rf /some/path | |
s3cmd get s3://path/to/your/data |
This file contains 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
DEFAULT_INPUT_POLICY="DROP" | |
DEFAULT_OUTPUT_POLICY="DROP" |
This file contains 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
sudo ufw enable | |
sudo ufw allow httpd | |
sudo ufw allow ftp | |
sudo ufw allow proto tcp from 1172.16.0.0 to port 25 | |
sudo ufw allow proto tcp from 200.83.5.145 to port 22 |
This file contains 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
mysql> show fields from custom_fields; | |
ERROR 1034 (HY000): Incorrect key file for table 'custom_fields'; | |
try to repair it |
This file contains 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
mysql> check table custom_fields; | |
+----------------------------+-------+----------+----------------------------------------------------------------+ | |
| Table | Op | Msg_type | Msg_text | | |
+----------------------------+-------+----------+----------------------------------------------------------------+ | |
| code_redmine.custom_fields | check | Error | Incorrect key file for table 'custom_fields'; try to repair it | | |
| code_redmine.custom_fields | check | error | Corrupt | | |
+----------------------------+-------+----------+----------------------------------------------------------------+ | |
2 rows in set (0.00 sec) |
This file contains 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
me@my-server:~# myisamchk -r /var/lib/mysql/redmine/custom_fields.MYI | |
- recovering (with sort) MyISAM-table '/var/lib/mysql/redmine/custom_fields.MYI' | |
Data records: 5 | |
- Fixing index 1 | |
- Fixing index 2 |
This file contains 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
mysql> show fields from custom_fields; | |
+-----------------+--------------+------+-----+---------+----------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+-----------------+--------------+------+-----+---------+----------------+ | |
| id | int(11) | NO | PRI | NULL | auto_increment | | |
| type | varchar(30) | NO | | | | | |
| name | varchar(30) | NO | | | | | |
| field_format | varchar(30) | NO | | | | | |
| possible_values | text | YES | | NULL | | | |
| regexp | varchar(255) | YES | | | | |
OlderNewer