Friday, March 22, 2019

Git revert commands

# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD
# It also takes ranges. This will revert the last three commits:
git revert HEAD~3..HEAD
git revert --no-commit 0766c053..HEAD
git commit
This will revert everything from the HEAD back to the commit hash 0766c053

HEAD means the current version. 

More from this link: https://stackoverflow.com/questions/4114095/how-to-revert-a-git-repository-to-a-previous-commit





Monday, March 14, 2016

美国韦恩州立大学招收计算机安全全奖博士

美国韦恩州立大学(Wayne State University)计算机系张锋巍(Fengwei Zhang)老师招收计算机安全方向的全奖博士生(RA/TA),2016年秋季入学。张老师参与了美国自然科学基金(NSF)和军方(DARPA, IAPRA, DHS)的科研项目,他的研究成果发表在计算机安全领域的顶级会议期刊上面,其中包括S&P, NDSS, DSN, ACSAC, 和TDSC。对计算机安全有热情的同学,请邮件联系他 fengwei[_]wayne.edu, 以及他的网站是 http://www.cs.wayne.edu/fengwei
欢迎本科生,硕士生,以及工作的同学都申请。对 TOFEL 和 GRE 分数没有硬性要求;但希望申请的同学有较强的动手能力,计算机系统知识扎实,对计算机安全研究有热情。张老师的实验室同时也招收博士后,访问学者,联合培养生,同时也十分欢迎计算机安全领域的老师来交流访问。

韦恩州立大学位于美国底特律市,是美国的公立研究型大学;它由13所学院和超过32,000名研究生和本科生的学院,提供超过400个主要学科领域。韦恩州立大学是美国30家规模最大的大学之一。校园非常安全,城市生活十分便利(有直飞北京上海的航班和大型中国超市)。韦恩州立大学计算机系统方面有五个 NSF CAREER 获得者,经常在顶级会议上面有论文发表,毕业的学生有去学校做老师,比如 William& Mary, Delaware 等,在读博士的同学们夏天也很受业界大公司们的青睐去科研实习,比如 Google,IBM Research,Facebook,Intel 等。 

关于韦恩大学的排名,不同的排名机构不一样,请大家参考百度百科和维基百科。下面是最新的美国大学学术表现排名,仅供大家参考。(The University Ranking by Academic Performance (URAP) 2015-2016): Wayne State University as 67th in the United States and 225th worldwide. 美国排名:67;全球排名:225。

排名规则:http://www.urapcenter.org/2015/index.php#
美国排名:http://www.urapcenter.org/2015/country.php?ccode=US&rank=all
全球排名:http://www.urapcenter.org/2015/world.php?q=MS0yNTA=
新闻报道: http://today.wayne.edu/featured-stories/22743?utm_source=link&utm_medium=email-56f9366f8b61a&utm_campaign=Today%40Wayne+-+Monday%2C+March+28%2C+2016&utm_content=















Thursday, February 4, 2016

Android Emulator requires 64 bit System

Error messages :


http://askubuntu.com/questions/534044/error-32-bit-linux-android-emulator-binaries-are-deprecated-when-attemping-to-r

You can download 64 bit Kali Linux from here:
https://www.kali.org/downloads/

Wednesday, February 3, 2016

Resize Disk in for VM images (Kali Linux as a Guest OS)

1. In VMware settings, change the disk size

2. Boot the VM image with the installation Disk ISO. You can choose the startup device in the VMware settings. 

3. Open the GParted application. 

4. Since the added space is at the end, you need to delete the swap Linux patitaion first, then you can expand your /dev/sda1. 

Details see: http://askubuntu.com/questions/51272/how-do-i-repartition-with-gparted

  1. In the machine's settings point the CD Drive to the .iso file with your Ubuntu LiveCD. You may also need to make sure the "Connect at power on" check box is checked.
  2. Power the virtual machine on and hit F2 with the focus inside the machine.
  3. Once inside the BIOS move to the Boot tab and select CD-Rom as primary boot device.
  4. Run gParted - I think it's always there.
  5. Destroy the swap partition: swapoff, delete the extended and linux-swap partitions.
  6. Resize your primary partition to desired size.
  7. Allocate your swap back again to whatever you like - create an extended partition and then allocate as linux swap. Remember about swapon :)
And that's it. You now have a big primary partition!
In my case you'd need to have Jedi reflexes to get into BIOS by pressing F2 on the splash screen - the boot delay is just too short. What you can do to slow it down is go to your vm's .vmx file and type in something reasonable like:


Other useful link: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1020778

Monday, February 1, 2016

Buffer Overflow

http://stackoverflow.com/questions/17775186/buffer-overflow-works-in-gdb-but-not-without-it

./BOF
and
./root/file/BOF
are different.


Wednesday, January 27, 2016

"I moved it" v.s. "I copied it"

http://www.experts-exchange.com/articles/12515/HOW-TO-Select-the-right-answer-to-I-Moved-It-or-I-Copied-It-in-VMware-vSphere-ESXi.html

I Moved It - should be used only, when you are manually moving a virtual machine between datastores, which includes moving to a new host and different datastore.

I Copied It - should be used when you want to COPY or CLONE a virtual machine, and used on the network at the same time as the original virtual machine.

Now that you have read, and hopefully understand the difference between "I Moved It" or "I Copied It" selections, I'll answer the question raised at the beginning

I've selected Copied, and now all My IP addresses have changed! Why?

As we've seen above, selecting "I Copied It" changes the uuid.bios and uuid.location values, which will force and generate a new MAC address. If you have been using DHCP (Dynamic Host Configuration Protocol) to supply IP Addresses to your computers on your LAN, your virtual machine will receive a new IP Address, after this change.

I hope this article helps you to understand the difference between "I Moved It" or "I Copied It" when you have moved or copied a virtual machine.

Friday, January 8, 2016

Compress on Mac using Terminal

If we right click the folder and then compress. The .zip may not be able to work across platforms (e.g., open it on Windows). We can use the terminal to compress files or folders.

http://coolestguidesontheplanet.com/how-to-compress-and-uncompress-files-and-folders-in-os-x-lion-10-7-using-terminal/

ZIP – Cross Platform

First up is ZIP one of the most commonly used compression techniques used across all platforms
To compress
zip -r archive_name.zip folder_to_compress
To extract
unzip archive_name.zip
If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” option in the command so:
zip -r -X archive_name.zip folder_to_compress

TAR.GZ – Cross Platform

Second up is TAR, an old favourite on Unix/Linux – you add the GZ for the compression – compresses tighter than zip
To compress
tar -zcvf archive_name.tar.gz folder_to_compress
To extract
tar -zxvf archive_name.tar.gz

TAR.BZ2 – Cross Platform

A variation on TAR GZ but with better compression than both tar.gz and zip.
To compress
tar -jcvf archive_name.tar.bz2 folder_to_compress
To extract
tar -jxvf archive_name.tar.bz2

GZ

Without the tar
To extract


gunzip archivename.gz