Ben Hamilton

Author Archives: Ben Hamilton

fdsdfsdf

Git Workflow Explained Simply

Git is a Code Versioning System (aka CVS) . It lets multiple developers, programers and project managers all work on the source code for a project with minimal stepping on each others toes. The workflow we use is as follows. We keep the a Git repository in the cloud, typically in Bitbucket. Each developer then […]

Posted in Productivity | Tagged , | Comments Off on Git Workflow Explained Simply
fdsdfsdf

Change Atom Command Palette Keyboard Shortcut

Testing out using Atom as a text editor on Mac OS. I found that the default keyboard shortcut for the Command Palette of shift-cmd-p doesn’t work for me. Dang! So I used cmd-. to see what was going on. I could see that when pressing shift-cmd-p it wasn’t being caught (look at the bottom of […]

Posted in How to | Tagged , , | Comments Off on Change Atom Command Palette Keyboard Shortcut
fdsdfsdf

Add 2 Years to Date in Excel

I wanted to add two years to a date in Excel. This is the formula you need Hat tip to www.mrexcel.com, assuming your original date is in column A. =DATE(YEAR(A1)+2,MONTH(A1),DAY(A1))

Posted in How to | Tagged | Comments Off on Add 2 Years to Date in Excel
fdsdfsdf

Excel DATEVALUE Function

When a Microsoft Excel spread sheet has a column of date data in this format: Nov 24 1995 Then the Excel function you’ll find useful is DATEVALUE DATEVALUE function. This formula here: =DATEVALUE((TRIM(MID(R2,5,2))&”-“&TRIM(LEFT(R2,3))&”-“&TRIM(RIGHT(R2,4))) Basically grabs the Day, then the Month, then the Year from the column, then converts it to a serial number that Excel […]

Posted in General | Tagged | Comments Off on Excel DATEVALUE Function
fdsdfsdf

Find JIRA Issues with Attachments

When you just know you’ve attached a file to a JIRA issue, but can’t find it, this is the search to do in Issues in JIRA Replace PKEY with your project key.: project = PKEY AND type != Epic and attachments is not EMPTY ORDER BY Status ASC

Posted in General | Tagged | Comments Off on Find JIRA Issues with Attachments
fdsdfsdf

SSH and Private Key usage on Mac OS X

It’s very important that your private keys are kept secure and away from prying eyes. A good place to keep your private keys is in the folder ~/.ssh as this makes it easier to manage (this is a subfolder of your home folder). You then want to set the permissions of the private key file […]

Posted in General | Tagged | Comments Off on SSH and Private Key usage on Mac OS X
fdsdfsdf

Tufte WP Theme

I’m currently testing This is a test side note. (as at Thursday 19 May 2016) a WordPress theme Naturaily/tufte-wp-theme that uses the CSS from edwardtufte/tufte-css. You can read more about it This is a second test side note. from Dave Liepmann.

Posted in General | Comments Off on Tufte WP Theme
fdsdfsdf

When SugarCRM Case Closed

Using the cases.date_modified is not the same as the date a case is closed, as the case may have been modified after it was closed. Thus, the query below will return the date the case was transitioned to ‘Closed’ provided the cases.status field is being audited. select CONVERT_TZ(cases_audit.date_created,’+00:00′,’+10:00′) as ‘date_closed’, accounts.name as ‘account’, cases.case_number, cases.name […]

Posted in SQL, SugarCRM | Tagged , | Comments Off on When SugarCRM Case Closed
fdsdfsdf

Export Evernote Notes to Apple Notes

Larry Salibra has a post on how to move notes from Evernote to Apple iCloud Notes. His Applescript does a fantastic job of this, the only issue I had was that my iCloud account was named differently to ‘iCloud’, all I did to resolve that was to rename my account in Apple Preferences > Accounts […]

Posted in How to, Productivity | Tagged , , , | Comments Off on Export Evernote Notes to Apple Notes
fdsdfsdf

Get the Weather From the Command Line

On Mac OS X or Linux (in fact anywhere you get the finger command) you can quickly get the weather. Jared, in our office here, just showed this to me, neato! :) finger brisbane@graph.no I particularly like the one line weather report finger o:brisbane@graph.no To get more info on how to use this, run this […]

Posted in *nix, How to, Productivity | Tagged , , | Comments Off on Get the Weather From the Command Line
fdsdfsdf

Find Process to Kill Process

Need to find a process so you can kill it? Find the process first, replace NAMEOFPROCESS with the name or part thereof of the process you’re trying to find: ps -ax | grep NAMEOFPROCESS The first column lists the process id. Then kill the process, replacing PROCESSID with the actual number of the process: kill […]

Posted in *nix, How to | Tagged , , | Comments Off on Find Process to Kill Process
fdsdfsdf

Find an IP address in files

Ever been looking for a config file that contains an incorrect IP address? If the IP address you’re looking for is 8.8.8.8 Then this command is for you: find . -type f -exec grep -l 8.8.8.8 {} \; It’ll find all occurrences of 8.8.8.8 that appear in files in the current directory and folders below […]

Posted in *nix, How to | Tagged , | Comments Off on Find an IP address in files
fdsdfsdf

Binge Learning is Failure

Good info from Scott Young: A great deal of psychological research shows that studying in a burst is less effective than study sessions spaced out over time. Blogs naturally embody the latter method, dripping out ideas over weeks and months instead of in a burst. Bolding mine. This aligns with what I was listening to […]

Posted in Productivity | Comments Off on Binge Learning is Failure
fdsdfsdf

Olixar Universal Bike Phone Mount

I commute to work every day on my motorcycle, it’s a 52 kilometre trip each way. Wearing my headphones, Waze lets me know of any accidents or hazards ahead but because the phone is in my jacket pocket, I only hear such warnings, I don’t see them. It would be nice to see the Waze […]

Posted in General, Hardware | Tagged , , , , | Comments Off on Olixar Universal Bike Phone Mount
fdsdfsdf

Set Windows power states from the command line

Use powercfg to set Windows power states from a script or command line.

Posted in General | Tagged , | Comments Off on Set Windows power states from the command line
fdsdfsdf

Tracking down long running queries in SQL

I’ve had a client whose Linux Server (CentOS) gradually gets slower and slower, then falls over. By logging into the MySQL command line, we were able to see that there were some long running queries that never end. show processlist; returns | Id | User | Host | db | Command | Time | State […]

Posted in *nix, SQL, SugarCRM | Tagged , | Comments Off on Tracking down long running queries in SQL
fdsdfsdf

Location of the SugarCRM log file

By default it’s in the same base folder as the SugarCRM application files. But on occasion we’ll move it. Quickly find it’s location by looking in the config.php file. The two relevant lines are: ‘log_dir’ => ‘/var/log/sugarcrm/’, ‘log_file’ => ‘sugarcrm.log’, If you’re at the command line, then this makes it easy: grep ‘log_dir’ config.php

Posted in General | Tagged , , | Comments Off on Location of the SugarCRM log file
fdsdfsdf

Find a file on a linux server

From the command line find / -name ‘index.html’ 2>/dev/null This will find and display all occurances of index.html and all the errors will not display.

Posted in General | Tagged | Comments Off on Find a file on a linux server
fdsdfsdf

Testing 1, 2, 3

Testing 1, 2, 3 Nothing to see, move along.

Posted in General | Tagged | Comments Off on Testing 1, 2, 3
fdsdfsdf

Offtopic: Slackline World Record

ACROSS THE SKY – a world record slackline in the utah desert from Camp 4 Collective on Vimeo. 

Posted in General | Tagged , | Comments Off on Offtopic: Slackline World Record