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://sscotter@bitbucket.org/sscotter/test2016-05-05.git # git add . # git status # git commit -m “First commit” # git push origin master Add 2nd machine to… 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 »

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 »

Outlook connectivity troubleshooting

Hold down Ctrl and Right click the Outlook icon in the system tray. You get two additional options in the menu, Connection Status and Test E-mail AutoConfiguration

sslyze

sslyze.exe –certinfo=basic HOSTNAME eg sslyze.exe –certinfo=basic activation.sls.microsoft.com eg sslyze.exe –certinfo=basic –starttls=auto crimson.spectrumcs.net:587 eg sslyze.exe –certinfo=basic –starttls=auto crimson.spectrumcs.net:25 c:\SUPPORT\SSL Software\sslyze>sslyze.exe –certinfo=basic activation.sls.microsoft.com c:\SUPPORT\SSL Software\sslyze>sslyze.exe –certinfo=basic activation.sls.microsoft.com REGISTERING AVAILABLE PLUGINS —————————– PluginCertInfo PluginCompression PluginChromeSha1Deprecation PluginSessionResumption PluginSessionRenegotiation PluginOpenSSLCipherSuites PluginHSTS PluginHeartbleed CHECKING HOST(S) AVAILABILITY —————————– activation.sls.microsoft.com:443 => 65.52.98.231:443 SCAN RESULTS FOR ACTIVATION.SLS.MICROSOFT.COM:443 – 65.52.98.231:443 ——————————————————————– * Certificate – Content: SHA1 Fingerprint:… Read More »

FreeBSD port downgrade with ports-mgmt/portdowngrade utility

WARNING: Its really important you do not run portdowngrade from within the /usr/ports directory. Doing so really fucked up my server and I needed to delete all ports and reinstall into them from a list I had available. First install ports-mgmt/portdowngrade and rehash to update cache Then OUTSIDE OF THE PORTS TREE (cd ~ is a… Read More »