Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| { | |
| "color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", | |
| "ensure_newline_at_eof_on_save": true, | |
| "flatland_square_tabs": true, | |
| "font_face": "Monospace", | |
| "font_size": 11, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], |
| search = Sunspot.search(Account, Order, Invoice) do | |
| fulltext params[:search] do | |
| query_phrase_slop 2 | |
| end | |
| data_accessor_for(Invoice).include = [:order] | |
| any_of do | |
| all_of do | |
| with :class, Account |
| >> Object.const_defined?('Account') | |
| => false | |
| >> Account | |
| => Account(id: integer, username: string, google_api_key: string, created_at: datetime, updated_at: datetime, is_active: boolean, randomize_search_results: boolean, contact_url: string, hide_featured_results: boolean, paginate_search_results: boolean) | |
| >> Object.const_defined?('Account') | |
| => true |
| sudo netstat -ap | grep :<port_number> | |
| stop port: | |
| kill <pid> | |
| Example: | |
| $ sudo netstat -ap | grep :3000 | |
| tcp 0 0 localhost:3000 *:* LISTEN 12488/ruby | |
| $ kill 12488 |
| Edit: | |
| /etc/mysql/my.cnf or /etc/my.cnf | |
| add line: | |
| bind-address = * | |
| MySQL: | |
| GRANT ALL PRIVILEGES ON *.* TO username@'%' IDENTIFIED BY 'MySecretPassword'; |
| EXPORT: | |
| mysqldump -u [uname] -p[pass] db_name > db_backup.sql | |
| IMPORT: | |
| mysql -u username -p databasename < data.sql |
| 1) service mysqld stop | |
| 2) mysqld_safe --skip-grant-tables & | |
| 3) mysql -u root | |
| 4) Setup new MySQL root user password | |
| use mysql; | |
| update user set password=PASSWORD("NEW-ROOT-PASSWORD") where user='root'; | |
| flush privileges; |
| cat /etc/*-release |
| mysql -u username -p database_name < file.sql |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000