[Quick Links] |
Search Site

Site Details

rendered in 0.0668 secs

Captain's Log | Thursday 17th of September 2015

How do I test controllers in CodeIgniter 2.x | CI

You don't. I couldn't get it working. Test you models and libraries in 2.x, leave third_party and helpers as they are by other people and look at updating to 3.x if you want to test controllers. also, don't both making DB calls in your tests, they could be working all happy days and then when you add another normal model load in an unrelated controller, the test just goes to piss. leave DB operations out of model tests

book review: Sapiens: A Brief History of Humankind

Best book I've ever read. Everything about this book was suited to my interest, brilliant read, very interesting all the way if you're in human history and psychology.

book review: working effectively with legacy code

testy test test test test test. good book with one clear message, get your code in a test harness and take it from there. keep classes/methods short and make sure you've got a tests in place to lead the migration to a better code base. great book for driving home the importance of testing.

How to Change The Session Time out Settings on a Remote Desktop Services Server 2012 | RDS disconnect Windows terminal server

On your Remote Desktop Server, launch SERVER MANAGER
Click QUICK SESSION COLLECTION (or whatever group name you have used)
In the top right of the PROPERTIES box click the TASKS drop down and select EDIT PROPERTIES
Expand SESSION section

Captain's Log | Thursday 10th of September 2015

Add new disk to Windows SBS backup (keywords: label drive)

Run the following command from an elevated command prompt to determine the Disk Identifier of the new disk:
wbadmin get disks
WBADMIN ENABLE BACKUP -addtarget:{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

To re-add a drive without having to delete the job and start again, go into disk manager, delete the partition. Create a new partition without a drive letter as NTFS and run a quick format. Then run the command above.

What's the easiest way to install sophos anti virus without using the console?

\\serverName\SophosUpdate\CIDs\S000\SAVSCFXP\instmsiw.exeOn mysql running on debian I keep getting "The used command is not allowed with this MySQL version | LOAD DATA LOCAL INFILE" error. Previously I was using an older version on centos and it was fine. answer sourceapt-get install php5-mysqlndHaving issues with lynx and https links, any ideas?apt-get install elinks
elinks -dump https://www.davelikesitsecure.com
How can I include pwd and $USER in my bash shell prompt?
I'm going to give the edit location for system wide below, if you just want it for a specific account, drop it in ~/.bashrc
sudo vim /etc/profile
export PS1='$(whoami)@$(hostname) $(pwd)$ '
quit  close your terminal session down, restart it and you should be done
dave@mail.vpnova.com /home/dave$
I'm getting No data found! or Permission denied when using transmission on my server and pointing the download location to a users subfolder?sudo service transmission-daemon stop
sudo vim /etc/init.d/transmission-daemon
sudo chown theUserTheFolderExistsWithin /var/lib/transmission-daemon/ -R
sudo service transmission-daemon start
  i'm the captain of the ship now

Captain's Log | Thursday 10th of September 2015

What's the difference between && and ; in bash scripts?
&& only runs the second command if the first one exited with status 0 (was successful). ; runs both the commands, even if the first one exits with a non zero status.

When remapping keys using xbindkeys, what's the easiest way to find out what the value is of the key I just pressed?

to get keyboard button, at terminal:

xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.

then press the key you're interested in, for example f and it will return 3 lines.
"(Scheme function)"
    m:0x0 + c:41

The two lines under the "(Scheme function)", or sometimes (No Command) depending on your distro are the ones you'll need to do your bind.

Edit ~/.xbindkeysrc for your mapping using the following format:
#comment / aliase
"commands to run, yes include the quotation marks"
keys + that
we got + from mapping above

Actual real life example:
# top left key tild mapped to ctrl w
"xdotool key --clearmodifiers --delay 500 ctrl+w"
    m:0x10 + c:49
    Mod2 + grave

to get mouse button, at terminal:

  hover your mouse into the window and you'll see a load of output in the terminal window, then just hit the mouse button you want to bind and look for the button number.
ButtonRelease event, serial 38, synthetic NO, window 0x3800001,
    root 0x2d5, subw 0x0, time 88641177, (96,119), root:(1377,175),
    state 0x0, button 10, same_screen YES

See the keyboard bind configuration above for examples, here is an example for a mouse button bind.
#switch up a workspace
"xdotool key --clearmodifiers ctrl+alt+Up"

Save and exit and run this at the terminal to reload xbindkeys and apply changes: pkill xbindkeys ; xbindkeys

I'd like to add a shortcut to my taskbar in linux but some items just won't pin

don't use this with cinnamon, right click one of the existing items in the "PANEL LAUNCHERS" applet at the bottom left and then hit, "Add" browse to the file and bish bash bosh
You need: sudo apt-get install alacarte
It will then install a program called "Main Menu", open it and hit -> New Item. Name and locate the command/program you want. Then you'll be able to drag this new menu item onto the taskbar as with any other shortcut.

Captain's Log | Tuesday 1st of September 2015

How can I setup phpunit on an existing codeigniter project?cd (... into root if your CI project)

  please note: the space and then 2.x at the end is the branch name we're interested it

git pull https://github.com/fmalk/codeigniter-phpunit 2.x
Then just use the git merge method(s) listed here and commit.
How to monitor mysql sql performance?mytop --promptHow to close down mysql clean cleanly properly safely safest best | shutdown stopmysqladmin -uroot -p -h127.0.0.1 --protocol=tcp shutdown
What should I use at my servername? | server name
Don't use any of the hostnames you are hosting. Had some major email routing issues with that shit, just use the hostname you've been assigned from your VPS provider and then make sure the PTR record on your external IP points to that hostname. Also configure the postfix greeting name to match that. You can still setup your MX records however you like.
Simple html javascript back button?[a href="javascript:history.back()"]Go Back[/a]book review: Pro Bash Programming - Chris F.A. Johnson
I hate saying this so I'm just going to keep it short, the programming book contained too much programming! | It's just not written in a way I benefit best. I like more of the reasoning behind the method rather than this is how you do that. Just a personal choice, no reflection on the author or content.

Captain's Log | Tuesday 1st of September 2015

book review: A Short History of Nearly Everything - Bill Bryson

Brilliant, must read for everyone interested in human history really. Very easy to read, some bits boring as shit but not for long and it's off again with nuggets of information. Very Happy.

How do I view active jobs in backup exec 2012 using powershell power shell?

Start -> Windows Powershell (not x86) -> Right Click -> Run as Admin
set-executionpolicy remotesigned -> Y

Start -> All Programs -> Symantec Backup Exec -> Backup Exec Management Command Line Interface
Get-BEJob -Status Active (this did no include active tape operations for me)

mysql cheat sheet commands | cheatsheet

mysql -uusername -ppassword database < filename
mysqldump -uusername -ppassword database > filename

How do I kill a hung / crashed / disconnected ssh / terminal session?


Course review: nand2tetris

On paper this looked the absolute bee's knees. You learn about designing simple "And" Gates and from their build an operating system, programming language, compiler and then your own game. I was very excited and worked through all the videos in the first module and although they jumped from the basics to some advanced concepts I was keen to get started with their hardware simulator. At first because the hardware simulator doesn't scale to your screen resolution (granted I was using a small netbook for the course initially) I had to move everything over to another machine with a larger screen. Then something as simple as the horizontal scroll for one of the inputs windows was broke, and was identified as an issue on their forum as far back as 2010! yet the latest course material comes with the same exact bug.

So I read through how to fix it and to be honest it was over my head. Not just a little file edit, you needed some java tool to break over a .jar file, correct and rebuild. I was happy that a course that covers so much would require a great amount of time invested but I'm not happy to get involved in something so complex when not only are you battling with the steep learning curve but the tools provided at the very start are buggy and have been for over 5 years and not corrected. How are you suppose to have confidence in a stack like that when trying to determine if the issue is with your method or the tools themselves.

I've got some many different courses and projects I want to work through I just don't have the time to battle with the tools that are there to help you complete the job.

Captain's Log | Tuesday 1st of September 2015

New / Fresh Server Setup

sudo vim /etc/mysql/conf.d/mysqld_safe_syslog.cnf


sudo service mysql restart

Confirm /var/log/mysql/general.log has been created and contains content.
  • Install CSF firewall, configure required ports, run through the configuration and add webmin component
  • Make sure /var/log/messages is grabbing php errors and that anything new in this file is being emailed to your personal email address straight away (every minute checks on log files)
  • Add /var/log/mysql/general.log to log watcher, restart the service and confirm you receive an alert to personal address. mysql will be the main area for application bottle necks so important we are receiving up to the minute warnings and errors