Change Date/Time of File Using Touch Command

Refer: http://askubuntu.com/questions/62492/how-can-i-change-the-date-modified-created-of-a-file

Find all the files in a directory and change date/time, even the script itself.

find -print | while read filename; do
# do whatever you want with the file
touch -t 201203101513 "$filename"
done

Change 2 hours from current time
touch -d "2 hours ago" filename

Change 2 hours from modify time of file itself
touch -d "$(date -R -r filename) - 2 hours" filename

SMBClient from the Command Line in Ubuntu

Ubuntu 14.04 Installation Update

$ sudo apt-get install cifs-utils
Refer: https://help.ubuntu.com/community/MountWindowsSharesPermanently

## List the shares
smbclient -L <windows-server-ip> -U<username>  ## It will prompt for password

## Access a share. Choose the one which you have access to from the list above
smbclient //<windows-server-ip>/<share-name> -U<username>  ## It will prompt for password

smbclient //192.168.1.13/temp -Umruckman

\\192.168.1.13\users\Public\Videos\

mput filename.extension

LDAP from Linux Command Line

> net group /DOMAIN TLAdmin
> net group /DOMAIN TLAdmin
> NET USER loginname /DOMAIN | FIND /I " name "

$ adquery user -p loginname

$ for i in `cat file.txt` do adquery user -p $i; done

You might try ldapsearch too

# Turn off word wrap with -r switch
$ ldapsearch mail=somone@hotmail.com -r

$ ldapsearch sAMAccountName=userId

Windows 10 Stuck on Update

Refer: http://bootables.net/windows-10-updates-stuck-download/

Open a command terminal as an administrator and shutdown two services:

  • C:>net stop wuauserv
  • C:>net stop bits

Go to the following folder and delete everything, a few folders may stick.

  • C:\Windows\SoftwareDistribution

Reboot your computer and update services should be already restarted, you can restart them manually like this with another admin terminal.

  • C:>net start wuauserv
  • C:>net start bits

Installing Kobi onto Ubuntu 14.04 Media Player

Refer: http://kodi.wiki/view/HOW-TO:Install_Kodi_for_Linux

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:team-xbmc/ppa
$ sudo apt-get update
$ sudo apt-get install kodi

Note: To keep the XMBC player from always going full screen, go to:

System, System, Video output, and set Display Mode to Window

WD My Cloud with Ubuntu

smb://192.168.1.18/public

Then XnView can find it here:
Computer/run/user/1000/gvfs/smb-share:server=192.168.1.18

This works much faster locally

While trying to figure this out, installed this, probably not necessary:

$ sudo apt-get install nfs-common

Dust versus AngularJS

JavaScript Framework Dust:
http://akdubya.github.io/dustjs/#guide

AngularJS versus Dust
Refer: http://stackoverflow.com/questions/15336187/what-is-the-difference-between-angularjs-and-dust-js

Dust.js is purely a templating module. So, it allows the combination of json with a template to deliver html output.

Angular.js is client side framework that allows binding of logic to variables defined in a template (your page).

So, with dust.js you are responsible for deciding when to run the json through the template. Typically you feed in the json on the server (or client) and ask it to render the results.

With angular.js when the model (the json) changes the framework re-renders as appropriate. Triggers for that change could be user actions (such as filling a form in) or it could be due to loading some fresh json from a service.

Typically you would use angular.js if you want a single page JS app (think gmail). dust.js is perhaps more akin to a traditional approach with multi pages with content driven by passing in json.

You could even use the both of them in tandem - server side rendering using dust.js with dynamic client side logic in angular.js.