• Examples of using git push command


    When using git push command to push code to the server, different requirements will have different usages. Some specific examples are as follows. Force to override git log information of server When we use the GIT reset command to rollback the commit information displayed in the local git log, we use thegit pushIf you submit […]

  • Zend opcache best practice configuration


    introduce I saw it on the Internet by accidentAn articleThis guy talked about it very succinctlyZend OpcacheHe said he spent a lot of time exploring the best settings for thisZend OpcacheI think this article is quite instructive, so I specially translate its setting method as follows opcache.revalidate_freq This option is used to set the cache […]

  • Tail of common linux commands


    tail NAME tail – output the last part of files SYNOPSIS tail [OPTION]… [FILE]… DESCRIPTION Print the last 10 lines of each FILE to standard output. With morethan one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.Mandatory arguments to long options are […]

  • Linux uses Su to switch users or specify users to execute commands


    instructions # su -h Usage: Su [option] [-] [user [parameter]…] Change the valid user ID and group ID to the ID of user. If user is not specified, the default is root. Options: -, – L, – login switches the environment variables (home, shell, user, logname, path, etc.) at the same time. If it is […]

  • Common command of docker operation – image


    Get image Docker pull [option] [docker registry address [: port number] /] warehouse name [: label] Example:docker pull ubuntu:16.04 Specific options can be selected through thedocker pull –helpName see Docker registry is docker hub by default, and the address format is < IP / domain name >Example:docker pull ubuntu:16.04 Run container Docker run warehouse nameTake […]

  • MySQL startup options and system variables


    The configuration information of MySQL can be realized in two ways. One is the command line form. When starting the MySQL service, the relevant configuration parameters will be brought along. This way will be invalid after the restart of MySQL. Another way is to write the configuration file, such as my.cnf, to start or restart […]

  • Linux Bridge vlan filtering


    After Linux bridge supports VLAN filtering function, we no longer need to divide VLAN by sub interface, which simplifies VLAN configuration. 1. Bridge VLAN description man bridgeWe can see that Linux configures VLAN filtering through the following commands: bridge vlan { add | del } dev DEV vid VID [ pvid ] [ untagged ] […]

  • Learn a Linux command every day (72): tcpdump


    Command introduction Tcpdump command is a package capturing tool in UNIX / Linux like environment. Tcpdump uses the command line mode to filter and grab the packets of the interface. If tcpdump without any options, it will grab the first network interface by default, and it will stop capturing packets only when the tcpdump process […]

  • Failed when the file name contains spaces


    Questions raisedError using previous script to add template to Xcode: #!/bin/bash SAVEIFS=$IFS IFS=$(echo -en “\n\b”) PROJECT_TEMPLATES_PATH=”/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application/” FILE_TEMPLATES_PATH=”/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source/” EMPTY_APPLICATION_PATH=”$PWD/Empty Application.xctemplate” OC_CATEGORY_PATH=”$PWD/Objective-C category.xctemplate” OC_PROTOCOL_PATH=”$PWD/Objective-C protocol.xctemplate” OC_EXTENSION_PATH=”$PWD/Objective-C class extension.xctemplate” cp -R $EMPTY_APPLICATION_PATH $PROJECT_TEMPLATES_PATH cp -R $OC_CATEGORY_PATH $FILE_TEMPLATES_PATH cp -R $OC_PROTOCOL_PATH $FILE_TEMPLATES_PATH cp -R $OC_EXTENSION_PATH $FILE_TEMPLATES_PATH IFS=$SAVEIFS Analyze the problem1. According to the prompt, the path of […]

  • Git method of setting and deleting command alias


    In git, you can use the GIT config command to set the alias of the specified command. When the command is executed later, you can use the alias instead to reduce the input. For example, the following command sets the letterslbylogAlias for command: $ git config –global alias.l log After setting, executegit lEquivalent to executiongit […]

  • Learn a Linux command every day (57): cal


    Command introduction The cal command is used to display the current calendar or the calendar of a specified date. Grammatical format cal [month] [year] [-m month] [-y year] [-h] [-3] [-1] [-A num] [-B num] [-d YYYY-MM] [-j] [-N] Option description -l   # Display single month output -3   # Displays the calendar for the next three months -s   # Make Sunday the first day of the month -m   # Make Monday the […]

  • (3) Orm of Django web development


    Orm in Django Object relational mapping (ORM) is to automatically persist objects in object-oriented language programs to relational databases by using metadata describing the mapping between objects and databases. Reference documents:https://docs.djangoproject.co… Django database configuration #Settings file DATABASES = { “default”: { “Engine”: “Django. DB. Backends. MySQL”, which can be modified according to the actual situation, […]