Skip to content

Instantly share code, notes, and snippets.

Left_Btn = 1
Mouse_M = 2
Right_Btn = 3
Mouse_G9 = 9
Mouse_LB = 5
Mouse_RB = 4
Skills_wall = {
const $ = cheerio.load(pm.response.text())
const ele = $('form input[type="hidden"]');
const csrf_token = ele.val();
console.log(csrf_token);
const loginRequest = {
url: 'https://a0f2a3f3-f800-40ba-8578-248561f0b0f8.mock.pstmn.io/login',
catNames=[]
while True:
print('Enter the name of cat'+str(len(catNames))+'(Or enter nothing to stop.):')
name=input()
if name=="":
break
catNames=catNames+[name] #1st concatenation
print('The cat names are:')
for name in catNames:
print(''+name)
<iframe style="position:absolute; left:0; top:0; width:100%; height:100%" src="https://www.youtube.com/embed/b2yvICvduFw?rel=0&amp;autoplay=1&vq=hd720" frameborder="0" allowfullscreen></iframe>
@ericxyan
ericxyan / Bash-note.md
Last active January 21, 2019 18:22
< /dev/null

< /dev/null is used to instantly send EOF to the program, so that it doesn't wait for input (/dev/null, the null device, is a special file that discards all data written to it, but reports that the write operation succeeded, and provides no data to any process that reads from it, yielding EOF immediately). & is a special type of command separator used to background the preceding process.

nohup myscript.sh >myscript.log 2>&1 </dev/null &
# |               ^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^
# |                    |           |      |     run in background
# |                    |           |      |     
# |                    |           |   don't expect input
# |                    |           |   
# | | redirect stderr to stdout
@ericxyan
ericxyan / VIM.md
Last active December 6, 2016 21:32
  • Set Tab
# vim.wikia.com/wiki/Converting_tabs_to_spaces
:set tabstop=4 # set tabs to display as four spaces
:set expandtab # apply to all new tab
:set shiftwidth=4 # change tab space to 4
:retab
  • Install Java 8
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
  • Start Elasticsearch on boot up:
sudo update-rc.d elasticsearch defaults 95 10

C Tool Kits

Maven

  • POM(Project Object Model):
  • pom.xml:
    • Maven project structure and contents are declared in an pom.xml file.
    • Resides in the base directory of the project
    • mandatory fields: groupId, artifactId, version
      <project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0