Topics - justice [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 43next
1
Finished Programs / WorkLog.py - work logging
« on: April 26, 2016, 04:15 AM »
Wrote this little script and thought it might be useful here. It allows you to keep track of what you are working on by writing a timestamped message to a CSV file.

worklog.png

Latest version: https://gist.github.com/svandragt/080843c4ba632deaab6f3aea57ca9684
Code: Python [Select]
  1. #v1.0.2
  2. from random import choice
  3. from datetime import datetime
  4.  
  5. phases = [
  6.     'Ok, noted.', 'Right, back to work then!', 'Looking good bud.', 'Cheers, mate.'
  7. ]
  8.  
  9. now = datetime.now()
  10. answer = ''
  11. with open("worklog.csv", "a") as f:
  12.     while answer.strip() != 'exit':
  13.         f.write('"{}","{}"\n'.format(now,answer.strip()))
  14.         answer = input("What're you working on? ")
  15.         now = datetime.now()
  16.         print("[{}]".format(now),choice(phases), "\n")

Requires Python 3.5. Then just run the file.

2
General Software Discussion / Bookmarking client
« on: April 03, 2015, 03:55 AM »
Xmarks keeps corrupting my browser bookmarks, and as I couldn't find an alternative that supported the browsers I use, I have opted for online bookmarking to have access to them from all my machines.
Currently I'm using Pinboard, which I like. But I cannot find a Windows client for it. Is there one? What's everybody else using?

I'm not a power user, I just want to search through my collected bookmarks to find the one I need and launch it. I'm happy to organise them using the website.

3
I'm using Screenshot Captor on a PC where the user's home directory, desktop and documents folders are stored on a network drive (stupid idea) and this is causing startup issues with the following message:

Error moving files: could not create directory OLDER

This is followed by:
Screenshot Captor - Disabling the auto-moving of old screenshots from now on. If you wish to re-enable it, see the 'Saving and Loading Files' tab in options.

Then a folder is created in the root of the harddisk with the name and path of the networkshare ie C:\SERVER\path\to\homedrive\DonationCoder\ScreenshotCaptor because SC does not understand UNC paths (\\SERVER\share).

SC then proceeds to startup correctly.

4
As expressed in the NANY 2014 project I unfortunately had to time for, I expressed my unhappiness with traditional todo / task list software. After reviewing my process I have come to the conclusion that I might have to write software to accurately capture / manage my workload. This would be desktop software for Windows.

Initially it seems most work (I'm working in web development) is best captured into 4 stages. I'm looking for your feedback to see if this is just how I work or if there is demand for something like this.

Code: Text [Select]
  1. Stage 0: Inbox: capture informal requests, ideas and suggestions. Most important is quick input
  2. Stage 1: Todo: 'next-up' where work gets specified and planned. Most important is completness of process
  3. Stage 2: Active Work Items: communication and capture progress on work as we are actively advancing the task. Most important is measuring progress
  4. Stage 3: Work Review: after work completes we want to report / review on it. Most important is high level review of work
  5.  
  6. S0: descriptions
  7. S1: project, title, files, communications, planned due date, priority ordering
  8. S2: Multiple progress updates, files, communications, actual due date
  9. S3: Export to zip, sort by date, filter by project

The software would be a combination of Evernote + a todo list + related file explorer where work advances through the stages.

Any feedback?


5
I've got a bunch of pcs needing their DNS updated to Open DNS so here's a powershell script that will let you choose a network adapter and then set the DNS servers.
OpenDNS servers are provided. The script will make sure to run itself as admin.

# 1.001
$servers = "208.67.222.222", "208.67.220.220"

# Functions
function IsAdmin() {
$wid     = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$prp     = new-object System.Security.Principal.WindowsPrincipal($wid)
$adm     = [System.Security.Principal.WindowsBuiltInRole]::Administrator
$IsAdmin = $prp.IsInRole($adm)
$IsAdmin

}

function SetDNSForNIC($s, $n) {
$dns = $n.DNSServerSearchOrder | Foreach {"$($_)"}
$description = $NIC.Description
Write-Host "OLD DNS settings for $description = $dns"

$NIC.SetDNSServerSearchOrder($s) | out-null

Write-Host "NEW DNS settings for $description = $s"
}

# Init
if (IsAdmin)
{
(get-host).UI.RawUI.Backgroundcolor="DarkRed"
clear-host
$NICs = Get-WMIObject Win32_NetworkAdapterConfiguration -computername . | where{$_.IPEnabled -eq $true}

$i = 1
$message = $choices = $nic_descriptions = @()
Foreach ($NIC in $NICs) {
$d = $NIC.Description
$nic_descriptions += $d
$message += "$i - $d`n"
$choices += New-Object System.Management.Automation.Host.ChoiceDescription "&$i", "Select $d."
$i = $i + 1
}   
$options = [System.Management.Automation.Host.ChoiceDescription[]]($choices)

$title = "Select Adapter to Update DNS Settings for:"
$result = $host.ui.PromptForChoice($title, $message, $options, 0)

$nic_descriptions[$result]
# exit

Foreach ($NIC in $NICs) {
If ($NIC.Description  -eq $nic_descriptions[$result] ) {
SetDNSForNIC $servers $NIC
}
}   
Write-Host "Press any key to continue ..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

}   
Else {
$this_script = $MyInvocation.MyCommand.Path
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList "-command `"$this_script`""
}

Network adapters are listed by Description, this is listed in the Network Connection Details.
I would have used the NetConnectionID but not everyone will have named their network connection.

Pages: [1] 2 3 4 5 6 ... 43next
Go to full version