Alibabacloud.com offers a wide variety of articles about best greasemonkey scripts, easily find your best greasemonkey scripts information here online.
Batch Delete scripts for large tables: MySQL version; Delete scripts for mysql
It is often necessary to regularly Delete historical data from some tables. The data in such tables is usually very huge. To reduce the impact on the online environment, the deletion must be divided into small batches.
I have previously shared the SQLServer version.
The following is the MySQL version:
1 delimiter $2 drop proc
Python scripts run in the background and python scripts run in the background
Problem description:
Environment: CentOS6.4
A monitoring script test1.py written in python is always running in the while True mode. Run the following command to start the script remotely (using the putty terminal) in ssh:
python test1.py
Now that the script runs normally, you can see the process number through ps. In this case,
Methods and instances for calling system commands, Shell scripts, and Python scripts in Nodejs, nodejspython
Each language has its own advantages. It can be combined with each other to develop programs that are more efficient to execute, or use which implementation method is simpler. nodejs uses sub-processes to call system commands or files, for more information about the documentation, see refer to interf
Python detects QQ online status scripts and python online status scripts
Code for querying whether QQ is onlineBy accessing http://wpa.qq.com/pa? P = 1: [QQ number]: 1 query the returned ImageIf 2329 is returned, 2262 is online, and offline.
123456789101112131415161718
importtime,datetime importurllib2 defchk_qq(qqnum): chkurl ='http://wpa.qq.com/pa?p=1:'+`qqnum`+':1'a =urllib2.urlopen(chkurl) l
1, case do with the execution of the option script:#!/bin/bashCase $ inXecho "X is selected";;*)echo "Please use X"EsacSecond, case combined while doing interactive script:#!/bin/bashWhile TrueDoRead-p "Enter Port of Chaoxingdata (d,1):" PortCase ${port} inDecho "Port=${port}"Read-p "Press ENTER to continue";;1)echo "Port=${port}"Read-p "Press ENTER to continue";;*)echo "Error input,you fool"Read-p ' type ' go ' to continue: ' Goif [! ${go} = go] | | [-Z ${go}]ThenExitFiEsacDoneShell
When a variable is evaluated in a script, you need to add a [] to the outside and set a $[email protected] tmp]# cat real_mem_used01.sh#!/bin/bashTotal= ' Free-g|grep Mem |awk ' {print $} 'Used= ' Free-g|grep Mem |awk ' {print $} 'Buffer= ' Free-g|grep Mem |awk ' {print $6} 'Cache= ' Free-g|grep Mem |awk ' {print $7} 'real_used=$[$USED-$BUFFER-$CACHE]pused=$[$real _used*100/$TOTAL]echo $PUSED%[Email protected] tmp]#[Email protected] tmp]# sh real_mem_used01.sh12%[Email protected] tmp]#Method Two
Synchronization script, in the 5th step to splice the host name of your own configuration1#!/bin/Bash2#1gets the number of input parameters, if there are no parameters, exit directly3Pcount=$#4 if((pcount==0)); Then5 echo no args;6 exit;7 fi8 9#2Get file nameTenp1=$1 OneFname=$ (basename $p 1) AEcho fname=$fname - -#3get parent directory to absolute Path thepdir=$ (CD-P $ (dirname $p 1); pwd) -Echo pdir=$pdir - -#4get the current user name +User=$ (WhoAmI) - +#5Loops A for((host=3; host5; ho
Tags: Restart started warning body Stop one result postLet's start with an example: Suppose you have a test service that can start, shut down, or restart test by command, the following script simulates this feature:#!/bin/bash#test.shcase $ in start) echo "Starting service ..." sleep 1 echo "started the service!!" ;; Stop) echo "Stopping service ..." sleep 1 echo "stopped the service!!" ;; Restart) echo "Restarting service .
Non-interactive password modification in Shell scripts and non-Password modification in shell scriptsToday, when I wrote a shell script, I found that the user's password needs to be set and the password is set to interactive. This is obviously not good in the script, So I went online to search for information, two common non-interactive password setting methods are found:1: Use chpasswdIn fact, chpasswd uses the user to enter the 'user name: password'
How to customize service scripts and how to create standard rpm service scriptsCustom Service script:
#!/bin/bash#myscript#chkconfig: 2345 90 20#description: Starts, stops and saves iptables firewallcase $1 in start) echo "start my script!!" sleep 1 ;; restart) echo "restart my script!!" sleep 1 ;; stop) echo "stop my script!!" sleep 1 ;; *) echo "please input start|restart|stop
Weblogic Start and Stop scripts and weblogic start scriptsStart weblogic
Determine whether to enable the service by using the port.
#! /Bin/bash # author: wjf # date: # test environment: wls1036 horizontal cluster v_curr_user = 'whoam' v _ start_user = uweblogic # ------------ user v_admin_url = http: // 10.10.71.106: 9001 # ------------ manage the server's urlv_dir_domain_bin =/weblogic/Oracle/Middleware/user_projects/domains/gyhr_domain/bin # -----
Special characters of shell scripts and special characters of shell scripts1. # comment ,#! Besides, echo $ {PATH # *:} parameter replacement does not represent annotation, numeric conversion, and echo $(2 #101011) 2 .; command Line separator. Multiple commands can be written in one line. echo hello; echo there3.; the Code for copying the terminate case option is as follows:Case "$ variable" inabc) echo "\ $ variable = abc"; xyz) echo "\ $ variable =
Webview Dynamic Injection of js scripts and webviewjs scriptsAfter the webview is loaded, add a local click event to all img tabs.
/** Function () {var objs = document. getElementsByTagName ('img '); for (var I = 0; I
Then
webview.getSettings().setJavaScriptEnabled(true);webview.addJavascriptInterface(new Object(){ @JavascriptInterface public void openImage(int i, String src) { ArrayList
Inject script code after page data is loaded
webvi
About server scripts and browser scripts nbsp; nbsp; web nbsp; I know this is a problem 2. please do not give me any further advice. Nbsp; I think browser scripts, such as javascript, are interpreted and executed by the browser. Server Scripts are Server Scripts and brow
Button
The button is essential in any program. This time, let's take a look at how to implement various functions of the button. Several scripts to be implemented in this article are as follows.
/* Chapter 6 of game script design and development * // Add a button. add (layer01, button01, null, 50, 50, OK _button_up, OK _button_over, null); function function_test01 (); // Remove button. remove (button01); endfunction; // remove the display layer. remo
[Shell] How Shell scripts are executed, and how shell scripts are executed
Bytes ----------------------------------------------------------------------------------------------------------
Command to complete most output tasks: echo
Echo helloworld; # correct
Echo "hello world"; # correct
Echo "hello world! "; # A space must be enclosed in quotation marks! In Linux, double quotation marks are not allowed, bu
Apart from syntax, there are some differences when writing scripts in C # Or boo. Most notable are:
In addition to syntax rules, there are some differences between using C # Or boo to write scripts. When you need to pay special attention:
1. inherit from monobehaviourInherited from monobehaviour
All behaviour scripts must inherit from monobehaviour (directly or i
The method for parsing Lua scripts in Unity3d, and unity3d for parsing lua scripts
Because the project has been proposed recentlyHot updateSo I spent the weekend with Lua. The combination of Lua and Unity3d only reaches a glimpse of the door path. The level is limited. You are welcome to correct your criticism.
There is not much information on the use of Lua scripts
Python generates database update scripts and python scripts
When I was working, the databases used in the test environment were inconsistent with those in the production environment, when the database in the test environment completes the test preparation and updates to the database in the production environment, we need to prepare the update script. If we accidentally did not remember it, we will forget wh
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.