Skip to content

Instantly share code, notes, and snippets.

@ilovecomputers
ilovecomputers / DragMe.js
Last active August 12, 2018 19:10
Drag Me browser snippet
"use strict";
/**
* Drag Me is based on this Kirupa snippet: https://www.kirupa.com/html5/drag.htm
*
* It allows you to translate an element by dragging it instead of tediously modifying the css text. However, this will blast away any transform applied on the element before, so modify setTranslate to your needs.
*
* Add it as a Chrome DevTools Snippet or a Firefox DevTools Scratchpad. Either way, when you run it:
*
* 1. Select the element in your browser's element inspector
@jobsamuel
jobsamuel / readme.md
Last active January 19, 2024 18:26
Run NodeJS as a Service on Ubuntu 14.04 LTS

Run NodeJS as a Service on Ubuntu 14.04 LTS

With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server?

  • Go to /etc/init/
  • $ sudo vim yourapp.conf
  • Paste script.conf
  • $ sudo start yourapp
  • And when you wanna kill the process $ sudo stop yourapp