Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View larsnystrom's full-sized avatar

Lars Nyström larsnystrom

View GitHub Profile
@larsnystrom
larsnystrom / getSelection.js
Created July 9, 2019 19:56
JS to get selected text as well as text before and after.
// Also see fiddle at:
//
function getUnselectedText(containerEl) {
var sel,
range,
tempRange,
before = "",
after = "",
selected = "";

Keybase proof

I hereby claim:

  • I am larsnystrom on github.
  • I am larsnystrom (https://keybase.io/larsnystrom) on keybase.
  • I have a public key ASDHwmop9vExwObpKe25aDCfxzfzYzAVxVS13W030TaB5Ao

To claim this, I am signing this object:

@larsnystrom
larsnystrom / Start Hotspot.desktop
Created January 10, 2014 15:07
Desktop entry files for starting and stopping ap-hotspot, a script for setting upp wireless hotspots in Access Point Mode. Information about ap-hotspot can be found on http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html Save these two files to your desktop and make them executable. If you'd like to run them from the dash yo…
[Desktop Entry]
Name=Start Hotspot
Comment=Start a wireless hotspot in Access Point Mode
Exec=gksudo /usr/bin/ap-hotspot start
Icon=/usr/share/icons/gnome/48x48/devices/network-wireless.png
Terminal=false
Type=Application
Categories=Network;