Live update / hot reload / browser sync

https://stackoverflow.com/questions/42391747/is-there-a-way-to-live-update-the-page-when-using-p5js

You need Node.js for this. You can install BrowserSync using the command :

npm install -g browser-sync

Then browse to your project directory and open browsersync using :

browser-sync start --server --directory --files "*"

This will open a new tab in your browser which will list files in the directory, you can then select a html file to load and you should see a Connected to Browsersync message on the top right. This will also track changes in all files in your current directory and update the page whenever any file changes.

Master Yushi

Select a SharePoint WebPart Item with jQuery

Kode i .ascx file:

<asp:Label ID="lblSomeLabel" runat="server"></asp:Label>

Kode i endelig html:

<span id="ctl00_m_g_6fb87798_677a_4b2e_804d_6cb23c3672d1_ctl00_lblSomeLabel"></span>

Så hvordan fanger man elementet fra JavaScript?

<script>
  "use strict";
  var $lblSomeLabel = $("[id$='_lblSomeLabel']");
  $lblSomeLabel.hide();
</script>

Læs mere på api.jquery.com:

Attribute Ends With Selector [name$=”value”]

Hearthbleed (Raspberry Pi)

The affected versions of OpenSSL are OpenSSL 1.0.1 through 1.0.1f (inclusive). Later versions (1.0.1g and ulterior[60]) and previous versions (1.0.0 branch and older) are not vulnerable. Installations of the affected versions are vulnerable unless OpenSSL was compiled with OPENSSL_NO_HEARTBEATS.

http://en.wikipedia.org/wiki/Heartbleed#Affected_OpenSSL_installations

Check openssl version:

$> openssl version -a
OpenSSL 1.0.1e 11 Feb 2013
built on: Sun Mar 24 12:44:00 UTC 2013

That’s bad, update needed!

$> sudo apt-get update
$> sudo apt-get install -y libssl1.0.0 openssl

Check version again:

$> openssl version -a
OpenSSL 1.0.1e 11 Feb 2013
built on: Sun Apr 20 11:41:41 UTC 2014

Version is still one of the affected versions, but build-date indicates a patch.

According to http://www.raspberrypi.org/forums/viewtopic.php?t=74133 debian backported a patch to 1.0.1e-2+rvt+deb7u5

$> sudo apt-cache show openssl
Package: openssl
Version: 1.0.1e-2+rvt+deb7u7

We are good, just reboot now:

$> sudo reboot

Oh, also replace any and all certificates and make all users replace their passwords, you know the drill.