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
| $ mongo | |
| > db.getSiblingDB('new_db').addUser('user', 'pass'); |
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
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
| echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
| sudo apt-get update | |
| sudo apt-get install mongodb-org |
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
| <?php | |
| $handle = fopen('php://memory', 'w'); | |
| $data = array('value 1', 20, 'text value', '0'); | |
| fputcsv($handle, $data, ';'); | |
| /* to be able to read from a handle, it is necessary to reset internal file pointer to the begining */ | |
| fseek($handle, 0); | |
| $csv = stream_get_contents($handle); |
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
| sudo apt-get install nautilus-dropbox | |
| cd && wget -O - "http://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - | |
| ~/.dropbox-dist/dropboxd | |
| # thunar plugin | |
| sudo add-apt-repository ppa:xubuntu-dev/extras | |
| sudo apt-get update | |
| sudo apt-get install thunar-dropbox-plugin |
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
| # add user webarthur | |
| adduser webarthur | |
| # add git group | |
| addgroup git | |
| # add user to group | |
| usermod -a -G git webarthur |
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
| # wp-config.php | |
| define('DOMAIN_CURRENT_SITE', 'localhost:8081'); | |
| # $wpdb->blogs | |
| domain=localhost:8081 | |
| path=/ | |
| # terminal | |
| sudo php -S localhost:8081 -t /var/www/html/centro-europeu |
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
| INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('666', 'demo', MD5('demo'), 'Demo', 'test@yourdomain.com', 'http://www.test.com/', '2006-06-06 00:00:00', '', '0', 'Demo'); | |
| INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '666', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
| INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '666', 'wp_user_level', '10'); |
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
| sudo add-apt-repository ppa:webupd8team/atom | |
| sudo apt-get update | |
| sudo apt-get install atom |
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
| sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
| sudo apt-get update | |
| sudo apt-get install sublime-text-installe |
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
| # From: https://github.com/czepol/geany-coffeescript-config/issues/2 | |
| # Save it in ~/.config/geany/filedefs/filetypes.Coffeescript.conf | |
| # Add at Tools -> Config files -> filetypes_extensions.conf | |
| # Coffeescript=*.coffee;*.coffeescript;*.cs; | |
| [settings] | |
| lexer_filetype=Javascript | |
| tag_parser=Javascript |