Monday, September 18, 2017


Fix windows 10 explorer not refreshing:

  • In Windows Explorer: choose Tools, Folder Options > Click the Search tab > Check or uncheck ANY option
  • Apply.
  • If this solves your problem, you can revert to your original setting and the problem will remain solved.
Copied from Bilo's answer on superuser.com

Wednesday, July 19, 2017

Setup VNC on linux

ssh into machine you would like to VNC into

run vncserver and setup a password

login to the vnc desktop that is printed out by the vncserver command.

Thursday, June 22, 2017

Hide Visual Studio "External Dependencies" folder

In Visual Studio 2010 and up there is a new folder which shows up in each of the projects labeled "External Dependencies". This folder can become unwieldy very quickly and makes using the Solution Explorer harder to use. It is easy to hide/remove this folder.

Tools->Options:
Text Editor->C/C++->Advanced:
In the Browsing/Navigation section there is an option for "Disable External Dependencies Folders"
Set that to True and then restart Visual Studio or reload the solution and the External Dependencies folder should no longer be there.

Thursday, June 15, 2017

ESP8266 AT Commands Notes (Version 1.4 with SDK 2.1.0)


AT
Should return OK

AT+GMR
Return the version information for the board

AT+CIFSR
Return IP info

Single Connection TCP 

//Set single connection mode
AT+CIPMUX=0

//Connect to test server
AT+CIPSTART="TCP","test.mosquitto.org",1883

//Check status
AT+CIPSTATUS

//Should return the following:
STATUS:3 //3 is for connected
+CIPSTATUS:0,"TCP","37.187.106.16",1883,10913,0

//Close the connection
AT+CIPCLOSE

Multiple Connection TCP

//Set multiple connection mode
AT+CIPMUX=1

//Connect to the first test server
AT+CIPSTART=0,"TCP","test.mosquitto.org",1883

//Connect to the second test server
AT+CIPSTART=1,"TCP","test.mosquitto.org",8883

//Check status
AT+CIPSTATUS

//Should return the following:
STATUS:3
+CIPSTATUS:0,"TCP","37.187.106.16",1883,44614,0
+CIPSTATUS:1,"TCP","37.187.106.16",8883,44244,0


//Close the connections
AT+CIPCLOSE=0
AT+CIPCLOSE=1

Send/Recieve Data

//Send data using
AT+CIPSEND=100 // 100 is the number of bytes to send.
<Data to send>

//Data from ESP8266
wait for +IPD,100://100 is the number of bytes being sent
//next characters are the data








Friday, May 19, 2017

Delete a ton of files in a ton of folders quickly

Be very careful with these commands as they will delete all files!!

From a windows cmd prompt or batch script.

Delete all files in all child folders without prompting

del /S /q *

Delete all folders recursively without prompting

rmdir /s /q .

Wednesday, March 22, 2017

FTP multiple parallel connections to download large file fast.

Some ISP's limit the download speed of a single file. This can lead to slower downloads of large files even though the speed you are paying for is much higher. For example my internet connection is advertised at 50 Mb/s download. When I try to download a large file from an ftp I get speeds around 600 KB/s or to put it in the same units as the ISP rate, 4.8 Mb/s. In order to get around that limitation I have to download the file using multiple connections.

 LFTP is an application for linux that has an option for multiple parallel download connections. It can be used on windows through the cygwin application (https://www.cygwin.com/).

Command to run lftp:

lftp <username>@<server>:<port>

Then to download a file using multiple connections:

pget -n <number of connections> <filename>

This will use up bandwidth on the server so be careful to not use too many connections if the server has limited bandwidth.

Thursday, March 9, 2017

Lineage OS Random Info

Download location of updates: /data/data/org.lineageos.updater/app_updates

Tuesday, March 7, 2017

TAR useful commands

Compress current directory into archive.tgz (verbose)

tar -czvf archive.tgz *

Compress xfiles directory into archive.tgz (verbose)

tar -czvf archive.tgz xfiles/

Extract archive.tgz into current directory

tar -xzvf archive.tgz

Extract archive.tgz into xfiles directory

tar -xzvf archive.tgz -C /xfiles/

Slightly modified from this blog post

Monday, March 6, 2017

GDB hints

Backtrace all threads:

thread apply all backtrace

GDB Cheat Sheet from DarkDust.net

Grub saving default OS Centos/RHL

Here is an example grub configuration file which saves the default OS based on the last picked OS.
/boot/grub/grub.conf

Don't use the full file. The OS arguments will probably not work on your system directly. There are two important pieces so this will work.

default=saved

which lets grub know it should save the default and use that instead of a hard coded default.

savedefault

which needs to be in the configuration for each OS that you want to save over the current default when it is selected.

Full example:

default=saved
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu

rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M rd_LVM_LV=vg_rhent529/lv_swap rd_LVM_LV=vg_rhent529/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet nouveau.modeset=0 rdblacklist=nouveau
initrd /initramfs-2.6.32-504.12.2.el6.x86_64.img
savedefault

title Windows 7
rootnoverify (hd1,0)
chainloader +1
savedefault