Archive for the 'Software' Category

Solved: Ender 3 pro can’t read TF card

Friday, October 30th, 2020

When I received my Ender 3 pro I was excited to print the same models that came with the printer, but when I put the card in, it would not read. So I plugged it into my pc and it read the data fine.

So I copied all the files to a folder on my pc and copied all the files to a local folder. I reformatted the card and copied back the gcode files that I wanted to print and it worked!

Tags: ,

Issue with f.lux and screenshots on Windows 10

Thursday, October 22nd, 2020

Recently I was helping my daughter with some homework and it was going well. That is until I tried to take a screen shot. The screen shot came out with a red tint to everything I captured. It took me a while as I worked through if it was a Snipping Tool issue or a general screen shot issue. It was any screen shot which was even more frustrating. I searched the internet for answers and saw some issues with Lenovo laptops but I am on a HP Laptop so that was no help. I tried updating the drivers for my video cards and that was no help.

Finally I thought of what could be adjusting colors on my computer and remembered I had installed f.lux to help with my sleep patterns as it helps to make the color levels of your monitor change as the night time arrives. It turns out that f.lux was messing with the screen capture and disabling f.lux made my screen captures look correct.

Tags:

Windows 10 Screen Rotation

Thursday, March 5th, 2020

I was recently trying to read a large log file and I needed to rotate my screen to portrait mode in order to read more text. Sadly, I learned that the CTRL+ALT+<LEFT ARROW> and CTRL+ALT+<RIGHT ARROW> key combinations are not implemented by the Windows OS but with each graphic card manufacturer. And sadly many of the more recent drivers no longer support this functionality.

In order to rotate the screen you need to use the display settings.

Either : Right-Click the desktop and choose “Display Settings”

or

Start > Settings > System > Display

Next: Select the display you want to rotate and scroll down to “Display Orientation”

Choose the orientation depending on the rotation of your mount. The options are:

  • Landscape
  • Portrait
  • Landscape (flipped)
  • Portrait (flipped)

Sadly the quick switching of displays may be gone but at least the ability still exists.

Tags:

Different ways to display Chrome logging entries

Wednesday, April 25th, 2018

When I develop in the web, there are plenty of times that I want to see information about where I am in the program or what is going on in the Javascript when I load the page. I use the Console to watch updates but it can be difficult to read when you have possibly hundreds of log statements.
Usually you can just use the standard console.log function:

> console.log("Some information");
Some information
or 

> console.debug("Some information");
Some information

or 

> console.info("Some information");
Some information

You also get the line number and file that the output comes from in the console.

But did you know that you can use the following:

console.clear()
console.error(object)
console.table(array)
console.warn()

Let’s say you want to clear the current console. You can place in your code, or use it within the console itself.

console.clear();

Or you can get color coded lines with the warn or error functions:

> console.warn("This is a warning");
► This is a warning
> console.error("Error: Danger");
Error: Danger
And if you need to display an array that and want a better layout use console.table():
> console.table(['a','b','c']);
(index) Value
0 “a”
1 “b”
2 “c”
► Array(3)

Kick off Chrome Debugging

Thursday, April 12th, 2018

I was talking to a friend of mine on the phone the other day and we were talking about how debugging in Chrome was sometimes frustrating. We both had some ideas on how that could have been made better for each of us.

While you can load your page, find the line of code, and add a set of breakpoints. He let me know kicking off the debugger in a certain part of your code just by adding the following line of code where you want the code to stop:

debugger;

Once this brings up the debugging window, this behaves like a breakpoint and stops execution. Now you can see the value of your variables, or you can step through the rest of your code line by line.

My next post will talk about the different kind of console logging functions that are availabole.

Useful Git Aliases

Thursday, March 9th, 2017

When you use git often, it is helpful to implement some aliases for frequent commands. Git has config options to allow for shortening commands or allowing you to use a simple command instead of a line of text that is difficult to remember.

Some simple shortcuts:
To make checkout shorter

git config --global alias.co checkout

This will allow you to just type:

git co

To make status shorter:

 
git config --global alias.st status

This will let you see the log with branch indicators and a graph of the branches:

git config --global alias.mylog "log --pretty=format:'%h %s [%an]' --graph"

This is similar to the mylog alias but is useful on a color terminal as it will highlight useful items in the comments:

git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit ==all"

The results will be the following lines in your .gitconfig file:

[alias]
        st = status
        co = checkout
        mylog = log --pretty=format:'%h %s [%an]' --graph
        lol = log --graph --decorate --pretty=oneline --abbrev-commit --all

Tags:

How to stop XfinityWifi from automatically connecting

Wednesday, October 21st, 2015

I take the train to the city every day and I have been seeing my connection suddenly switch to ‘xfinitywifi’. This was getting very frustrating as I didn’t want to be on a public wifi and it was switching off of my hotspot or home network. It was not in the list of managed networks either. I found out that Comcast was automatically registering your Hardware MAC address and it would try to connect anytime it was in range.

The following steps helped to remove my Hardware MAC address from there system.

Login to Xfinity.com

  1. Click “My Account”
  2. Sign in — You must have access to billing to do this —
  3. Click “My Services” tab
  4. Click on “Xfinity Internet” on the subtab under “My Services & Equipment.”
  5. Select the “Manage devices for hotspot access” option
  6. Manage or remove the devices from your account by clicking “remove” next to each one you want to disconnect.

Tags:

Windows GodMode folder

Monday, January 12th, 2015

I just found a way to create a settings folder in Windows 7. This God Mode folder can be created by:

1) Create a new Folder
2) Rename the folder to : GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

Then the folder will change its icon and give you access to the settings for your computer in one place.

VI: Indent lines

Wednesday, March 12th, 2014

The other day I was editing some code and as usual I was in Vi. It was python code and I had refactored some code and needed to indent a section of code. I did not relish the idea of trying to make sure that all the indents were done on several dozen lines of code so I looked into how to indent the code in VI.

Here is the sequence that let me indent blocks easily.

I used <shift>-V to select the entire line.

Then I selected multiple lines by using the arrow keys or j or k depending on which direction you need to select.

Then you use the ‘>’ key to indent to the right and the ‘<‘ key to decrease the indent to the left.

Counting lines, words and characters with wc

Thursday, February 13th, 2014

There is a simple Linux utility for counting characters, lines and words in files called wc. This allows you to give a file as an argument or a stream and get the counts of the aforementioned items.

wc <filename>

or

cat <filename> | wc

The options that wc accepts

-c,–bytes print the byte counts
-m,–chars print the character counts
-l,–lines print the line counts
-L,–max-line-length print the length of the longest line
-w,–words print the word counts

The ouput with no arguments will be three numbers (words,lines,characters. Otherwise the the number will reflect the argument you have passed.

And if you pass multiple filenames the output displays counts for all files and totals.

 >wc -l HelloWorld.java sample.txt
    8 HelloWorld.java
   25 sample.txt
   33 total

Tags: ,