Windows Local Security Policies

Export current state of the machine secedit.exe /export /cfg C:\some-filename.inf How to Reset All Local Security Policy Settings to Default in Windows When finished, you can close the elevated command prompt if you like secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose Reset the computer to apply Reference https://www.tenforums.com/tutorials/68588-reset-local-security-policy-settings-default-windows.html

Upgrading FreeBSD 10.4-p13 to 11.2 with freebsd-update

Get the existing OS to date with both Kernel and packages. freebsd-update fetch install pkg update & pkg upgrade Initial commands, to record what’s currently installed and tidy up caches etc portmaster –list-origins > ~/installed-port-list-`date “+%Y-%m-%d-%H%M%S”`.txt portsnap fetch update portmaster -ty –clean-distfiles portmaster –check-port-dbdir portmaster -Faf Upgrade the OS This bit takes a while, about… Read More »

Update office 365 command

C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe /update user updatepromptuser=true forceappshutdown=true displaylevel=true   Can be scheduled to.   Look into the possibility of scheduling across a domain with displaylevel=false? https://blogs.technet.microsoft.com/odsupport/2014/03/03/the-new-update-now-feature-for-office-2013-click-to-run-for-office365-and-its-associated-command-line-and-switches/    

Idiots guide to getting started in git

A new repo from scratch Create a directory to contain the project. Go into the new directory. Type git init. Write some code. Type git add to add the files Type git commit. A new repo from an existing project Say you’ve got an existing project that you want to start tracking with git. Go into the directory containing… Read More »

Category: Git

Git for steve the idiot

Add git to an existing project Create a new repo on bitbucket cd to project you wish to git… # cd /usr/local/www/apache24/data/project123 # git init Initialized empty Git repository in /usr/local/www/apache24/data/project123/.git/ # git remote add origin https://username@bitbucket.org/username/test2016-05-05.git # git add . # git status # git commit -m “First commit” # git push origin master Add 2nd machine… Read More »

Category: Git

Copying plex data from one FreeNAS jail to another

Situation… My FreeNAS USB stick died and I had no backup of the FreeNAS configuration file (school boy error). I’ve imported my ZFS pool and imported my jails (can’t remember how – It was a long time ago) but I’m unable to update my jails software because they weren’t installed via plugins. Solution… Install the plugin correctly,… Read More »

debian / ubunti network configuation

Edit /etc/network/interfaces To apply update do a # service networking restart Note. Can be risk doing this via SSH. If there’s a type in your /etc/network/interfaces your network interface will not come back up and you’ll be unable to connect remotely via SSH. Any other services (apache etc) will also be uncontactable.

Windows 10 / ESX 5.5

Windows 10 boxes reboot every 24 hours (or so). Problem in VM SATA driver. Convert CD drive to IDE and remove SATA Controller. If that doesn’t work update ESX to 6 U1b https://communities.vmware.com/thread/509448?start=0  

Disable Update to Windows 10

bit.ly/no-gwx https://support.microsoft.com/en-us/kb/3080351 The actual updates… Windows Update Client for Windows 7 and Windows Server 2008 R2: July 2015 Windows Update Client for Windows 8.1 and Windows Server 2012 R2: July 2015 After Update installed add / edit group / local Policy in the following location… Computer Configuration To block the upgrade by using Computer Configuration, follow… Read More »

Exchange Backup Procedure

https://technet.microsoft.com/en-us/library/aa998340(EXCHG.80).aspx You followed this procedure to move a EDB file from a dying SBS server to a different server running Exchange 2007 in Trial mode. Old server was called SVL2008, new server was called SVL2DC (ie they were completely different), they were on the same domain though (unsure if that makes any difference?) The procedure was unexpectedly painless!

WordPress plugins to remember

https://wordpress.org/plugins/duplicator/ The Duplicator gives WordPress administrators the ability to migrate, copy or clone a site from one location to another. The plugin also serves as a simple backup utility. The Duplicator supports both serialized and base64 serialized string replacement. If you need to move WordPress or backup WordPress this plugin can help simplify the process.… Read More »

Office Administrative Template / Group Policy

32bit / 64bit refers to the architecture of the Office, not the Operating System. Office 2013 Administrative Template files (ADMX/ADML) and Office Customization To Office 2013 Administrative Template files (ADMX/ADML) and Office Customization Tool 32bit Office 2013 Administrative Template files (ADMX/ADML) and Office Customization Tool 64bit Office 2016 Administrative Template files (ADMX/ADML) and Office Customization… Read More »

FreeBSD grep recursive but exclude some directories

grep ‘scs’ –exclude=’./frontend/runtime/*’ –exclude=’./backend/runtime/*’ –exclude=’./console/runtime/*’ –exclude=’./vendor/*’ . -R grep ‘status’ –exclude-dir={runtime,debug,migrations,web,vendor} . -R

Yii2 crib sheet (until I create some proper pages)

Creating URL Old way (Yii 1.0 maybe??) $url = Yii::$app->controller->createUrl(‘xx’);// your own url generation logic New way (Yii 2.0 ) $url = \Yii::$app->getUrlManager()->createUrl(‘consignment/label’); Creating controllers Debugging (old skool) Yii::info(“My message” , ‘scsdebug’); Yii::warning(“this->consignment_date=” . $this->consignment_date , ‘scsdebug’); Yii::warning(\DateTime::createFromFormat(‘d/m/Y’, $this->consignment_date) , ‘scsdebug’);

Category: Yii

putting awstats live on a long hosted website

Search /home/awstats/DirData/ for any files relating to the domain you’re dealing with and are newer than those for which you have logs. eg… ll /home/awstats/DirData/awstats*.www.example.com.txt ll /home/awstats/DirData/awstats*2015.www.example.com.txt and then either remove them (if you know you can recreate them) or move them to a temp location rm /home/awstats/DirData/awstats122015.www.example.com.txt mv /home/awstats/DirData/awstats*.www.example.com.txt /tmp/awstats.tmp/ Unzip all your log files cd… Read More »

WordPress harderning with apache

Installing WordFence #1 #2 gives you protection and great visibility into whats going on. It’s easy to think no problems = no attacks, but after installing WordFence it was immediately obvious how much attach my little old website was under – and not because it’s a popular site (far from it – I’m pretty sure I’m… Read More »

Screen rotation – Intel HD Graphics

Special keys are Ctrl + Alt + Up (to get screen correct) Ctrl + Alt + Down (to get screen upside down) Ctrl + Alt + Left (to get rotated 90 degrees left) Ctrl + Alt + Right (to get rotated 90 degrees right)  

Comment for mcrypt_create_iv / Suggested work flow for encryption

https://secure.php.net/manual/en/function.mcrypt-create-iv.php#114645 http://pastebin.com/sN6buivY# === Original comment for PHP’s mcrypt_create_iv === Block ciphers, at their core, are a pair of transformation algorithms, called transforms. One encrypts, one decrypts – in some cases the algorithms are one and the same, but that’s not important. A block transform takes a fixed-length block of plaintext, transforms it using a secret… Read More »

Munin plugin & Use of uninitialized value in

I usually find sticking this code in an existing plugin resolve the problem if(!defined $data->{$ds->{name}}) { $data->{$ds->{name}} = 0; } eg Use of uninitialized value in printf at /usr/local/etc/munin/plugins/mysql_innodb_io_pend line 885. so I stuck the code in just before line 885. The red highlighted text is the added code, the orange is the code which was… Read More »