Getting prepared for a motorcycle tour for a month. Across Canada to the southern states and loop back via west coast.
Messin’ around with the linux box again.
I wanted to try my hand in setting up a file server (SAMBA) at home and since I have a few old XP boxes around and people keep donating them to me, so I figure why not work them till they die.
This one particular machine is an old laptop that a friend dropped and broke the screen. Two packages to install, Remote Desktop Protocol (X11VNC or TIGHTVNC) Since the screen would have cost more to fix than replacing with a newer laptop with better specs, it got donated to my collection. I will be setting up remote desktop so I don’t even have to plug in the monitor to this screenless laptop.
Specs on this laptop is not great, but storage is sweet:
500meg ram, 100gb hd and 80gb hd, AMD turon64, 1.5mhz
Loaded Lubuntu 14.04 also had Peppermint OS 4 (but not for this tutorial), 64bit(Ubuntu variant), chose this because it is lightweight, if you have even smaller specs, i recommend Lubuntu.
Back to Samba, not loaded in this distro, so I had to get the files.
sudo apt-get install samba
After setting up Samba, I found my self on the Win8 trying to look for my server on the same network and Workgroup, but stupid windows needed more help. I had to add some more code in the smb.conf file in my lubuntuserver ( what I called the server, original eh?).
sudo leafpad /etc/samba/smb.conf
[global] server string = jasperguy server box workgroup = PREY netbios name = lubuntuserver security = user encrypt password = yes guest account = nobody name resolve order = bcast host include = /etc/samba/smbshared.conf local master = no wins support = yes dns proxy = no
# Browser Control Options: # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply local master = no # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = yes # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names # via DNS nslookups. The built-in default for versions 1.9.17 is yes, # this has been changed in version 1.9.18 to no. dns proxy = no
Tell the server to route what is shared on the server.
sudo leafpad /etc/samba/smbshared.conf
[movies] <-change to what you want comment = Linux file server share path = /media/eddie/D007-B745 <- path to what your shared drive/folder is browsable = yes guest ok = yes read only = yes available = yes public = yes writable = no valid users = eddie
Create a Samba User
There are two steps to creating a user. First we’ll run the smbpasswd utility to create a samba password for the user.
sudo smbpasswd -a <username>
Next, we’ll add that username to the smbusers file.
sudo leafpad /etc/samba/smbusers
Add in the following line, substituting the username with the one you want to give access to. The format is <ubuntuusername> = “<samba username>”. You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.
<username> = “<username>”
Did a quick restart on samba after adding the lines and bobs your uncle,
sudo service smbd restart
it shows up on my Win8. Now it works sharing files with different platform.
If you want more details on the Samba server set up. toss me an email and I’ll expand this post.But I think if you follow all the command lines on this post, you should have your own file server up and running asap.
Rooting a mobile has it’s ups and downs. With that said, BACKUP before you start.
Download Kies software for your PC, the Mac does not work well and not tested. and since this model is sgh-t989d samsung galaxy s2 hercules, you do not want kies 3, just the normal one. http://www.samsung.com/ca/support/usefulsoftware/KIES/JSP
Download Odin3 software, the version I used is 3.09, I got it here: http://android.sc/download-odin-3-09/ The button is a little different then the previous versions, but same spot, the second one “AP” or “PDA”. another souce: http://www.sammobile.com/firmwares/3/?download=13702
Then you download a file that only does the recovery. That one I got here: http://downloadandroidrom.com/file/GalaxyS2TMobile/rooting/tmobilegalaxys2rootICS.zip watch out which link is the correct link for that file, most of those other download links are just ads.
So whether you have Ice Cream 4.0 or Jelly Bean 4.1.2 Android OS, this tutorial should work. If my links are out of date, please send me an email and I’ll correct it. If you are starting with Ice Cream, update it first to Jelly Bean with Kies, the app should pull your carriers firmware and updated with out looking for it all over the Internet.
Once you plug in your phone to the computer, go and upgrade and install. Just follow the guide that comes with Kies. If you already messed up your phone and have a different carrier firmware, skip this step and use the Odin3 to get the correct software. I had to do it because I followed a tutorial that was all T-mobile files. This is where you have to go to this site: http://www.sammobile.com/firmwares/3/?download=13702 You can also get the Odin3 3.09 here also, but it is the firmware from sammobile.com is what you want. Follow those directions and you should be fine.
Lets say you have started fresh, this video is the best I have found: http://youtu.be/l5GXBtMri3o#aid=P-pM_17YhNo
Download tmobilegalaxys2rootICS.zip and unzip if you have not done so already, you should find 4 files in the unzipped folder.
Connect your phone to your computer as a disk drive and copy the file CWM-SuperSU-v0.87.zip to your phone in a folder where you can find it later.
This is not for firmware change, just flashing the “recovery”.
First, plug in a micro-USB cable from your Galaxy S2 to your computer then hold down Volume Up, Volume Down, and the Power button together or volume down, home button, and power button together for about 10 secondsStep
When your phone resets (you will feel a little vibration), let go of the Power button but keep holding down the Volume Up and Volume Down buttons or Home and Volume down button.
When you see the warning sign, hit Volume Up button to enter ODIN Download mode.
The recovery-cmw-hercules.tar is the one you use with Odin3.
Choose “PDA” or “AP” then choose the file “recovery-cmw-hercules.tar” and hit the “Start” button.
DO NOT TOUCH ANYTHING ELSE!!!
Unplug the micro-USB cable then hold down Volume Up, Volume Down, and Power buttons together for about 10 seconds. Let go of the Power button when your phone resets.
Choose “install zip from sdcard”.
Choose either “choose zip from sdcard” or “choose zip from internal sdcard” depending on where you put the file
Find the file CWM-SuperSU-v0.87.zip.
Choose “yes”. This will root your phone and install SuperSU superuser app.
Reboot and you will find yourself a fully-rooted Koodo Galaxy S2 SGH-T989 with SuperSU app.
Install an app that needs root and get the following screen. and that will tell you that you have rooted the phone.
I will not be held responsible for failure of process or you equipment. Do this at your own risk.
Although this article was originally written for OS X Lion, the command has been tested and proved to work in Snow Leopard, Mountain Lion and Mavericks as well
So here’s my first of what will soon be many OS X terminal commands to do what the third party apps do, without the bloat/overhead.
To enable hidden files/folders in finder windows:
Open the Utilities folder
Open a terminal window
Copy and paste the following line in:
defaults write com.apple.Finder AppleShowAllFiles YES
Now hold ‘alt’ on the keyboard and right click on the Finder icon
Click on Relaunch
You should find you will now be able to see any hidden files or folders. One you are done, perform the steps above however, replace the terminal command in step 4 with:
defaults write com.apple.Finder AppleShowAllFiles NO
If the above is not working for you, you may want to try switching YES/NO to TRUE/FALSE .. Beware that this is case sensitive!
defaults write com.apple.Finder AppleShowAllFiles TRUE
There are plenty of tutorials online to create an HTML signature in Apple Mail with Snow Leopard, but it has changed slightly for Lion. Here is how to do it:
- In Mail.app, go to
Signaturesand create a signature with any random content. Name it something meaningful. You will be swapping this out later.
- Write an html page inside of your favorite text editor. The page should not have
bodytags, should include only inline css, and should only consist of basic html elements (
- Open the file in Safari.
- Click “File” > “Save As” and save as a webarchive.
- Open the folder
to show your email signatures in Finder by holding down the Option key and clicking the “Go” menu in Finder.
- Locate the webarchive file you created in step 1 using quick look (spacebar). Could be named different on different OS.
- Copy the exact name of the webarchive located in step 6, and delete the file.
- Replace it with the webarchive you created in step 4, giving it the exact same name that you copied in step 7.
- Restart Mail.app and go to
Signatures. If you have images in your signature, they will not show here in the preview, but they will show in the real signature if the location is valid.
- Open a new compose window and see your new html signature.
Found this online:
After researching online and learning that I am not alone with this issue, I deployed a threefold defense strategy to eliminate future memory conflicts related to the now-infamous
cache.php pandemic. First, open the file
wp-includes/cache.php and place the following code immediately after the opening
ini_set('memory_limit','32M'); // set memory to prevent fatal errors
After that, create an htaccess file for the
wp-includes directory and insert the following directive:
# set memory limit for cache.php php_value memory_limit 32M
Finally, create a local
php.ini file in the same directory (
wp-includes) and insert this:
;; set memory limit for cache.php memory_limit = 32M
And that’s it. Save, upload, test and check for additional errors. If necessary, you may wish to try alternate values for the memory limit. I am not positive, but I think that valid values include
8, 12, 16, 32, 64, 128, ...etc., but the upper limit will vary depending on your server settings. Like I said, it doesn’t always work, but it definitely seems to help reduce the overall volume of memory-related errors in certain environments.
Jetpack register error
Have this error?
Jetpack could not contact WordPress.com: register_http_request_failed. This usually means something is incorrectly configured on your web host. SSL read: error:00000000:lib(0):func(0):reason(0), errno 0
I solved this problem by adding a line of code to the wp-config.php file. Just after the lines below add this line:
define( 'JETPACK_CLIENT__HTTPS', 'NEVER' );
The final should look like this:
* @package WordPress
define( ‘JETPACK_CLIENT__HTTPS’, ‘NEVER’ );
// ** My SQL…
That solved any issues. I can’t promise it won’t cause another, but for now, so far so good.
Deleting wifi profiles off Windows 8
Open a run box window (or press win+R) then type cmd to open Windows 8 CLI.
To see stored wireless profiles, type:netsh wlan show profiles
This will show a list of saved profiles of your connected WLAN devices. Then you’ll need to write/save/memorize the profile name that you want to change.
To see the stored key (WPA/WEP/etc) of a specific profile:netsh wlan show profiles name=[profile name] key=clear
You’ll find the key content under security settings.
To delete a stored profile:netsh wlan delete profile name=[profile name]
This will delete the stored profile of every WLAN interface. If you want to delete the profile of a specific WLAN interface, you need to use the following:netsh wlan delete profile name=[profile name] interface=[interface name]
To set network priority, Albert Xing contributes this command:
netsh wlan set profileorder name="network_name" interface="interface_name" priority=1
The ability to delete network profiles whenever and wherever you are is especially important if there are any public networks you’ve connected to that are set to automatically reconnect when in range. As we’ve seen before, hackers love to masquerade as public Wi-Fi networks. If you want to automate the deletion of open Wi-Fi networks in Windows 8, Scott Hanselman has created WiFi.exe, a utility (with GUI) to do just that.
A little collection of CLI for my web server
Ubuntu / Debian package installation:
- apt-get install mysql-client
- apt-get install mysql-server
Ever get going on a tweak and messed up your own default files and did not do a back-up?
I do it all the time and have to reset. So I was messing around with the interfaces file and I tried to make it a static IP. But after several configurations, I did not manage to get it working. So I had to reset the file but forgot what was my original setting and it disconnected my network. 😦
This fix was my savior.
sudo nano /etc/network/interfaces
Default for interfaces file
auto eth0 iface lo inet looback
Below here is unfinished, will be setting this up later.
check current config
shut down network and turn on
sudo ifconfig eth0 down sudo ifconfig eth0 up
IP address of 192.168.1.1xx (What you want the IP of your ubuntu machine to be)
default mask of 255.255.255.0 (also called /24 – You typically don’t change this- mine was different and changed )
gateway 192.168.1.1 (This is most likely your home router’s IP address by default)
network 192.168.1.0 (So it knows what network to run on)
broadcast 192.168.1.255 (Where do send its “I don’t know where to go” messages)
dns-nameservers 192.168.1.1 (Will use the DNS server your router uses)