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
CREATE DATABASE db_name CHARACTER SET utf8 COLLATE utf8_general_ci; | |
GRANT ALL ON db_name.* TO user_name@localhost IDENTIFIED BY 'password'; | |
FLUSH PRIVILEGES; |
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
1) dd if=/dev/zero of=FileName bs=<block size> count=<block count> | |
The following command creates a file named big_file.dat with size of 1GB: | |
dd if=/dev/zero of=big_file.dat bs=1024 count=1000000 | |
2) mkfile -n size[b|k|m|g] filename | |
For example: | |
mkfile -n 1g big_file.txt |
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
// Instead of | |
// app.use(express.bodyParser()) | |
// use: | |
app.use(express.json()) | |
.use(express.urlencoded()); | |
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
# See http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/ | |
$ groupadd apl_devs | |
$ useradd -g apl_devs -d /var/www/sass -s /sbin/nologin apl_dev_sass | |
$ passwd apl_dev_sass | |
Changing password for user apl_dev_sass. | |
New password: | |
Retype new password: | |
passwd: all authentication tokens updated successfully. |
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
$ rpm -Uvh http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.4.7-1.el6.ngx.x86_64.rpm | |
$ chkconfig --add nginx | |
$ chkconfig --levels 235 nginx on |
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
# Enable Fedora Extra Packages for Enterprise Linux (EPEL) repos | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
# Install npm from the epel repos | |
$ sudo yum install npm --enablerepo=epel |
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
wget http://url --user=<user> --password=<password> |
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
// Split file | |
$ split -b<size>m <bigFileName> <smallerFileName> | |
// Join files | |
$ cat <smallerFileName>* > <bigFileName> | |
For example: | |
$ split -b20m big.zip smaller.zip | |
$ cat smaller.zip* > big.zip |
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
// OS X Mountain Lion or Lion | |
$ sudo killall -HUP mDNSResponder | |
// Mac OS X v10.6 | |
$ sudo dscacheutil -flushcache |
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
// http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html | |
$ wget http://dev.mysql.com/get/mysql-community-release-el6-4.noarch.rpm | |
$ sudo yum localinstall mysql-community-release-el6-4.noarch.rpm | |
// Check MySQL Yum repos has been added | |
$ sudo yum repolist enabled | grep "mysql-community" | |
Failed to set locale, defaulting to C | |
mysql-community MySQL Community Server 19 |
OlderNewer