
how to fix a dead Li-ion samsung battery
02/08/2014
More then a year a go I put away my old Samsung phone in its box.
Totally forgotten about it I had an idea to play with it again so I tried to start it up but nothing happend. We just need to put it in the charger again right? After a few hours charging the phone was still playing dead. Nothing nada njet niks!
Searching on the many webpages about Li-ion batteries I came to the conclusion that the best thing to do is to buy a new battery. uh huh. Now that is not going to happen.
We know that you need a bit of current in the battery for some phones to enable their in build charging circuit. But how to get it charged without a fancy charger?
If you don’t mind to let a battery explode in your face then there is a little trick.
Needless to say that you might void your warranty and you might loose some limbs doing this.. We gonna jump start it! If it works for a car why not try that for a Li-ion battery…
If you want the science behind it, why this actually works, than please search and feel free to comment 😉
This is what I did:
Strip one side of the USB cable,and tape the right poles to the battery.
As most of the time, red goes to the + and black to the –
I used some high temperature tape that u can use for soldering. But any good tape will do.
Plugin the USB cable and keep your fingers crossed now you still got them.
After 20 minutes I pulled the plug, got rid of the the tape and inserted the battery in the phone.
Now its charging, and the phone works!
Did I tell you that this isn’t the right way to do it?
I warned you about the fact that it could blow up in your face?
I mentioned that it might void your Samsung warranty?
Yes I did! Happy hacking!
Chatting with Max from Frozen Electronics and he came up with this tip:
“Max: You could destroy the battery, the chargers have a current-limiting PNP transistor in them!
Max: In the future, there’s a pretty simple constant current circuit you can build if you’ve got a P-channel MOSFET around somewhere. the chips are a dime a dozen on Newark/digikey (even ebay) and you can control the voltage and charge speed with potentiometers. almost like a universal li-po charger.
Max: Here’s the chip, the datasheet has the circuit in it, it’s really easy to use. there’s versions of the chip for all the common li-ion voltages (4.1, 4.2, 8.2, 8.4). It’s all based around a p-channel mosfet pass transistor. http://www.ti.com/product/bq2057 “
Thank’s max. Might try that one next time!
Share the post "how to fix a dead Li-ion samsung battery"

Fix mount issues Linux and Windows 8 NTFS
27/07/2014
Windows 8 has a option that you can boot faster. It stores (hibernates) your system. Sometimes Linux can’t mount your local disks and it will give you this kinda error:
Unable to mount location
Error mounting /dev/sda2 at /media/pieter/DATA: Command-line `mount -t “ntfs” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177” “/dev/sda2” “/media/pieter/DATA”‘ exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount ‘/dev/sda2’: Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the ‘ro’ mount option.
What worked for me was to disable the “fast start” option in windows 8.
1. Open Control Panel and choose Power Options.
2. Click on “Choose what the power buttons do”.
3. Click on “Change settings that are currently unavailable”.
4. Uncheck “Turn on fast startup (recommended)”.
If you want to try some more options this page might help you:
http://www.hecticgeek.com/2013/01/mount-windows-8-partition-ubuntu-hybrid-boot/
Share the post "Fix mount issues Linux and Windows 8 NTFS"

Fail2ban and wordpress
25/07/2014
If you use fail2ban on your server and you are running WordPress you could use this plugin:
https://wordpress.org/plugins/wp-fail2ban/
“WP fail2ban logs all login attempts, whether successful or not, to syslog using LOG_AUTH.”
So now when kiddies try to “hack” your login page, Fail2Ban will kick in and do its job.
wordpress.conf:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# Fail2Ban configuration file # # Author: Charles Lecklider # [INCLUDES] # Read common prefixes. If any customizations available -- read them from # common.local before = common.conf [Definition] _daemon = wordpress # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag "<HOST>" can # be used for standard IP/hostname matching and is only an alias for # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) # Values: TEXT # failregex = ^%(__prefix_line)sAuthentication failure for .* from <HOST>$ # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. # Values: TEXT # ignoreregex = |
WP fail2ban plugin:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
<?php /* Plugin Name: WP fail2ban Plugin URI: https://charles.lecklider.org/wordpress/wp-fail2ban/ Description: Write all login attempts to syslog for integration with fail2ban. Version: 1.2.1 Author: Charles Lecklider Author URI: https://charles.lecklider.org/ License: GPL2 */ /* Copyright 2012-13 Charles Lecklider (email : wordpress@charles.lecklider.org) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ add_action( 'wp_login', function($user_login, $user) { openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH); syslog(LOG_INFO,"Accepted password for $user_login from {$_SERVER['REMOTE_ADDR']}"); },10,2); add_action( 'wp_login_failed', function($username) { openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH); syslog(LOG_NOTICE,"Authentication failure for $username from {$_SERVER['REMOTE_ADDR']}"); }); |
Share the post "Fail2ban and wordpress"

Very cheap ebooks till 5 July
02/07/2014
Some time ago I did a review about a well written linux mint book from Packt Publishing.
Because they celebrate their 10 years anniversary you can get any book from their bookshelf for only 10 dollars. So if you want that copy of the “Raspberry Pi Cookbook for Python Programmers” or some “Advanced Penetration Testing” books. You can now get them very cheap.
As they mention on their web site:
This month marks 10 years since we embarked on our mission to deliver effective learning and information services to IT professionals. To celebrate this huge milestone, we are offering ALL of our eBooks and Videos at just $10 each for 10 days – this promotion covers every title and you can stock up on as many copies as you like until July 5th.
Some of the categories you can choose the books from:
- Application Development
- Big Data and Business Intelligence
- Business Skills
- CMS and eCommerce
- Enterprise Products and Platforms
- Game Development
- Instant
- Mobile Application Development
- Networking and Servers
- Video
- Virtualization and Cloud
- Web Development
Anyway, just a few day’s left to get some of the 2000 good books for a low price.
Share the post "Very cheap ebooks till 5 July"

Install .deb Packages (Linux)
01/07/2014
Sometimes its handy to just install a .deb from the command line..
1 2 |
dpkg -i package.deb dpkg --install package.deb |
Got a few packages in a subdir and want to install them all at once:
1 2 |
dpkg -i -R /path/with-many-deb-files/ dpkg -i --recursive /path/with-many-deb-files/ |
Share the post "Install .deb Packages (Linux)"