text Sublie文本快捷方式

Sublime Text 3的工作流程快捷方式

sublimetext3_shortcuts
ctrl+shift+p : open up any command from command pallete

ctrl+shift+p [type : install] : install packages

ctrl+p : open any file in the project

ctrl+p+enter : switch between last files

ctril+k, ctril+b : show/hide sidebar

F11 : fullscreen mode

ctrl+d : select the word, press again to select next instance of the word

alt+f3 : select all the instance of the selected word

ctrl+l : select line

ctrl + page down/page up : switch between tabs or split tabs

ctrl+/ : comment or uncomment hovered over line or selected lines

ctrl+r : jump to function

ctrl+shift+d : copy current line and jump the cursor with it

ctrl+shift+up/ctrl+shift+down : move the line up or down

ALT-CTRL-↑ or ALT-CTRL-↓ : increment or decrement numeric value by 0.1
ALT-↑ or ALT-↓  :Increment or decrement numeric value by 1
ALT-SHIFT-↑ or ALT-SHIFT-↓ : Increment or decrement numeric values by 10

____________________



theme installed :

material theme

color installed :

colorsublim package->install->facebook

_____________________________


packages installed :


advance new file (ANF)
-----------------------
shortcuts :

ctrl+alt+n : create new file in the current directory

ctrl+shift+p->anf->rename-> :  - rename and save the file in current directory



origami :
---------
shortcuts :

ctrl+k, ctrl+right : open and focus a new tab vertically

ctrl+k, ctrl+down : open and focus an new tab horizontally

ctrl+k, ctrl+. : destroy current tab

--------------------


terminal :

--------------
settings :

{
	// The command to execute for the terminal, leave blank for the OS default
	// On OS X the terminal can be set to iTerm.sh to execute iTerm
    "terminal": "C:\\Program Files\\Git\\git-bash.exe",

    // A list of default parameters to pass to the terminal, this can be
    // overridden by passing the "parameters" key with a list value to the args
    // dict when calling the "open_terminal" or "open_terminal_project_folder"
    // commands
    "parameters": ["-c", "cd \"%CWD%\" && \"C:\\Program Files\\Git\\bin\\sh.exe\" -i -l"]
}

shorcuts :

Open Terminal at File Press ctrl+shift+t on Windows and Linux, or cmd+shift+t on OS X
Open Terminal at Project Folder Press ctrl+alt+shift+t on Windows and Linux, or cmd+alt+shift+t on OS X

--------------------------

ProjectManager :
----------------

ctrl+shift+p->add project->enter : add project to quick list
ctrl+shift+p->edit project->enter : edit project folder path

ctrl+alt+p : switch between projects

---------------------


Laravel Collective Code Snippets :
-----------------------------------

Usage
To use these snippets, type the trigger text followed by the Tab key.

Trigger   Text	Output

formopen	{!! Form::open() !!}
formclose	{!! Form::close() !!}
formtoken	{!! Form::token() !!}
formmodel	{!! Form::model($user, []) !!}
formlabel	{!! Form::label($for, $text, []) !!}
formtext	{!! Form::text($name, $value, []) !!}
formtextarea	{!! Form::textarea($name, $value, []) !!}
formpassword	{!! Form::password($name, []) !!}
formhidden	{!! Form::hidden($name, $value, []) !!}
formemail	{!! Form::email($name, $value, []) !!}
formfile	{!! Form::file($name, []) !!}
formcheckbox	{!! Form::checkbox($name, $value, $checked, []) !!}
formradio	{!! Form::radio($name, $value, $checked, []) !!}
formnumber	{!! Form::number($name, $value, []) !!}
formdate	{!! Form::date($name, \Carbon\Carbon::now(), []) !!}
formselect	{!! Form::select($name, $optionsArray, $defaultKey, []) !!}
formselectrange	{!! Form::selectRange($name, $min, $max), [] !!}
formselectmonth	{!! Form::selectMonth($name, []) !!}
formsubmit	{!! Form::submit($text, []) !!}

----------------------------------------------------



Laravel Collective from + Bootstrap snippets (good for error message display) :

-------------

Available snippets :

General :

Input 	Shortcut

Form	bootform
Form model	bootformmodel


Inputs :

Input 	Shortcut

Button	bootbutton
Checkbox	bootcheckbox
Date	bootdate
Email	bootemail
File	bootfile
Hidden	boothidden
Number	bootnumber
Password	bootpassword
Radio	bootradio
Select	bootselect
SelectMonth	bootselectmonth
SelectYear	bootselectyear
SelectRange	bootselectrange
Text	boottext
Textarea	boottextarea
Horizontal inputs
Input	Shortcut
Checkbox	bootcheckboxh
Date	bootdateh
Email	bootemailh
File	bootfileh
Number	bootnumberh
Password	bootpasswordh
Radio	bootradioh
Select	bootselecth
SelectMonth	bootselectmonthh
SelectYear	bootselectyearh
SelectRange	bootselectrangeh
Text	boottexth
Textarea	boottextareah

--------------------------------


Laravel 5 Snippets for Sublime Text :

-----------------------------------

Usage
The included snippets are organized in categories following Laravel's Facades and their documentation; such as Auth::, Config:: and Session::. This way, you can quickly search for what you'd like to accomplish thanks to Sublime Text fuzzy search.

All the snippets in this package follow the following naming convention : {category}::{function name}. For example : Auth::check will produce this snippet in your code : Auth::check().

Included snippets
Here are the available snippet categories and prefixes :

Prefix	Notes
Auth	
Blade	The Laravel Blade Highlighter package is required to enable Snippets autocomplete in Blade files.
Cache	
Config	
Console	
Cookie	
Crypt	
DB	To create raw database queries and transactions.
Event	
Hash	
Helper	Contains sub-categories : Helper::array, Helper::misc, Helper::path, Helper::strings, and Helper::url; just like in Laravel's documentation.
Input	
Log	
Mail	
Redirect	
Relation	To create model relationships.
Response	
Route	
Schema	Contains two sub-categories : Schema:: for snippets related to the database table itself; and Column:: for snippets related to the columns.
Session	
Storage	
View	

-------------------------------

php mysqli connection snippet :

pmc->tab

-----------------------------------------


laravel 5 artisan

material theme

color sublime

package resource viewer : to extract and modify package( theme backgroud color to match )

sublie linter

sublime linter php

laravel blade highlighter

laravel blade autocomplete

_________________________________________

text 数字海洋修复主题上传问题

wp_theme

https://www.digitalocean.com/community/questions/can-t-install-wordpress-themes-ftp-error



I also added this define('FSMETHOD', 'direct'); in wp-config.php file:
define('FSMETHOD', 'direct');

Then I did this in terminal:
chown -R www-data:www-data /var/www
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;

text 修复Digital Ocean的权限问题

wp_persmissions

https://www.digitalocean.com/community/questions/group-owner-and-updating-wordpress-plugins

change  to :
sudo chown -R www-data:www-data /var/www/html

to html or to whaterver the webroot of WP is located

text 通过命令行安装Wordpress数据库

wp_db

https://www.digitalocean.com/community/questions/how-do-you-setup-a-mysql-database-to-use-with-a-wordpress-installation

Suppose user is root and password is: 1b71689f74f86
mysql  -u root -p
1b71689f74f86


mysql -u root mysql -p

CREATE DATABASE utahbaby;

CREATE USER 'utahbabyuser'@'localhost' IDENTIFIED BY '1b71689f74f86';

GRANT ALL PRIVILEGES ON utahbaby.* TO 'utahbabyuser'@'localhost';

FLUSH PRIVILEGES;



for FTP you might need:
define('FS_METHOD','direct');



text 删除所有docker容器和图像

delete all docker containers and images
sudo docker rm $(sudo docker stop $(sudo docker ps -a -q))
sudo docker rmi $(sudo docker images -a -q)

text adb帮助菜单

adb帮助菜单

adb-output
$ adb 
Android Debug Bridge version 1.0.31

 -a                            - directs adb to listen on all interfaces for a connection
 -d                            - directs command to the only connected USB device
                                 returns an error if more than one USB device is present.
 -e                            - directs command to the only running emulator.
                                 returns an error if more than one emulator is running.
 -s <specific device>          - directs command to the device or emulator with the given
                                 serial number or qualifier. Overrides ANDROID_SERIAL
                                 environment variable.
 -p <product name or path>     - simple product name like 'sooner', or
                                 a relative/absolute path to a product
                                 out directory like 'out/target/product/sooner'.
                                 If -p is not specified, the ANDROID_PRODUCT_OUT
                                 environment variable is used, which must
                                 be an absolute path.
 -H                            - Name of adb server host (default: localhost)
 -P                            - Port of adb server (default: 5037)
 devices [-l]                  - list all connected devices
                                 ('-l' will also list device qualifiers)
 connect <host>[:<port>]       - connect to a device via TCP/IP
                                 Port 5555 is used by default if no port number is specified.
 disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.
                                 Port 5555 is used by default if no port number is specified.
                                 Using this command with no additional arguments
                                 will disconnect from all connected TCP/IP devices.

device commands:
  adb push <local> <remote>    - copy file/dir to device
  adb pull <remote> [<local>]  - copy file/dir from device
  adb sync [ <directory> ]     - copy host->device only if changed
                                 (-l means list but don't copy)
                                 (see 'adb help all')
  adb shell                    - run remote shell interactively
  adb shell <command>          - run remote shell command
  adb emu <command>            - run emulator console command
  adb logcat [ <filter-spec> ] - View device log
  adb forward --list           - list all forward socket connections.
                                 the format is a list of lines with the following format:
                                    <serial> " " <local> " " <remote> "\n"
  adb forward <local> <remote> - forward socket connections
                                 forward specs are one of: 
                                   tcp:<port>
                                   localabstract:<unix domain socket name>
                                   localreserved:<unix domain socket name>
                                   localfilesystem:<unix domain socket name>
                                   dev:<character device name>
                                   jdwp:<process pid> (remote only)
  adb forward --no-rebind <local> <remote>
                               - same as 'adb forward <local> <remote>' but fails
                                 if <local> is already forwarded
  adb forward --remove <local> - remove a specific forward socket connection
  adb forward --remove-all     - remove all forward socket connections
  adb jdwp                     - list PIDs of processes hosting a JDWP transport
  adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
                               - push this package file to the device and install it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data)
                                 ('-s' means install on SD card instead of internal storage)
                                 ('--algo', '--key', and '--iv' mean the file is encrypted already)
  adb uninstall [-k] <package> - remove this app package from the device
                                 ('-k' means keep the data and cache directories)
  adb bugreport                - return all information from the device
                                 that should be included in a bug report.

  adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
                               - write an archive of the device's data to <file>.
                                 If no -f option is supplied then the data is written
                                 to "backup.ab" in the current directory.
                                 (-apk|-noapk enable/disable backup of the .apks themselves
                                    in the archive; the default is noapk.)
                                 (-shared|-noshared enable/disable backup of the device's
                                    shared storage / SD card contents; the default is noshared.)
                                 (-all means to back up all installed applications)
                                 (-system|-nosystem toggles whether -all automatically includes
                                    system applications; the default is to include system apps)
                                 (<packages...> is the list of applications to be backed up.  If
                                    the -all or -shared flags are passed, then the package
                                    list is optional.  Applications explicitly given on the
                                    command line will be included even if -nosystem would
                                    ordinarily cause them to be omitted.)

  adb restore <file>           - restore device contents from the <file> backup archive

  adb help                     - show this help message
  adb version                  - show version num

scripting:
  adb wait-for-device          - block until device is online
  adb start-server             - ensure that there is a server running
  adb kill-server              - kill the server if it is running
  adb get-state                - prints: offline | bootloader | device
  adb get-serialno             - prints: <serial-number>
  adb get-devpath              - prints: <device-path>
  adb status-window            - continuously print device status for a specified device
  adb remount                  - remounts the /system partition on the device read-write
  adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
  adb reboot-bootloader        - reboots the device into the bootloader
  adb root                     - restarts the adbd daemon with root permissions
  adb usb                      - restarts the adbd daemon listening on USB
  adb tcpip <port>             - restarts the adbd daemon listening on TCP on the specified port
networking:
  adb ppp <tty> [parameters]   - Run PPP over USB.
 Note: you should not automatically start a PPP connection.
 <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
 [parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
  <localdir> can be interpreted in several ways:

  - If <directory> is not specified, both /system and /data partitions will be updated.

  - If it is "system" or "data", only the corresponding partition
    is updated.

environmental variables:
  ADB_TRACE                    - Print debug information. A comma separated list of the following values
                                 1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
  ANDROID_SERIAL               - The serial number to connect to. -s takes priority over this if given.
  ANDROID_LOG_TAGS             - When used with the logcat option, only these debug tags are printed.

text 颜色和字体

一些不错的字体和颜色的背景,边框等

fonts and colors

border colors: #ededed

vertical divider line (darker) : #afb3b0

icon color light: #9d9d9d

Nice red color from "red balloon" #EF4B43

text Phil Delong 2017-12-16 1-of-96.txt

Phil Delong 2017-12-16 1-of-96.txt

Phil Delong 2017-12-16 1-of-96 .txt
Chat on 12/16/17 at 7:09 AM

(7:09 AM) Lindsay Welch: Well I feel like a wuss because I’m nervous to be in the dark going in early.  
(7:09 AM) Phil Delong: Are you there yet?
(7:09 AM) Lindsay Welch: Not yet 
(7:10 AM) Phil Delong: I won’t ask you to do this again, I feel bad that you’re nervous.
(7:11 AM) Lindsay Welch: You didn’t ask me. 
(7:12 AM) Lindsay Welch: I’d like to be comfortable to go in early regularly because I need to get shit done
(7:13 AM) Phil Delong: I certainly know that feeling. Well I’m here so you aren’t alone, just do what I said before you go in. 
(7:14 AM) Lindsay Welch: Did you get some sleep?
(7:19 AM) Phil Delong: Yeah, I don’t really feel any better but it was nice to be asleep for a while. Yesterday was just really emotionally draining.
(7:22 AM) Phil Delong: I’m really not trying to make my problems, your problems.
(7:25 AM) Lindsay Welch: Your not. I want to support you however you need it. 
(7:28 AM) Lindsay Welch: I am inside now. FYI 
(7:30 AM) Phil Delong: Good, I’m glad you got in okay.
(7:31 AM) Phil Delong: Also FYI Chowder is opening with me so I hope you put at least a little effort in to your appearance because the fashion police will be here.
(7:32 AM) Lindsay Welch: Hahahaha well I don’t need him asking me if I’m going on a date either 

text 终端命令

terminal_commnads
cd 
ls
mkdir
touch
| grep
cat
tail
head

text Chmod权限使用

使用chmod命令解释

chmod.txt
First digit in the above mode number is used to set setuid, setgid, or sticky bit. Each remain digit set permission for the owner, group, and world as follows:

4 = r (Read)
2 = w (Write)
1 = x (eXecute)
So you end up creating the triplets for your user by adding above digits. For e.g.

To represent rwx triplet use 4+2+1=7
To represent rw- triplet use 4+2+0=6
To represent r– triplet use 4+0+0=4
To represent r-x triplet use 4+0+1=5
To only give full permission to user, use it as follows:
chmod 0700 file.txt

0 – Use set setuid, setgid, or sticky bit
7 – Full permission for owner (rwx = 4+2+1=7)
0 – Remove group permission (— = 0+0+0=0)