Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| // @source: http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript | |
| function randomStr(m) { | |
| var m = m || 9; s = '', r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
| for (var i=0; i < m; i++) { s += r.charAt(Math.floor(Math.random()*r.length)); } | |
| return s; | |
| }; |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| //http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
| Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
| window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
| navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia; | |
| window.addEventListener('load', init, false); | |
| function init () { | |
| try { | |
| record(new AudioContext()); | |
| } | |
| catch (e) { |
| // this is the background code... | |
| // listen for our browerAction to be clicked | |
| chrome.browserAction.onClicked.addListener(function (tab) { | |
| // for the current tab, inject the "inject.js" file & execute it | |
| chrome.tabs.executeScript(tab.ib, { | |
| file: 'inject.js' | |
| }); | |
| }); |
| // MIT License - Copyright (c) 2016 Can Güney Aksakalli | |
| // https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Net.Sockets; | |
| using System.Net; | |
| using System.IO; |
| #!/usr/bin/env ruby | |
| # encoding: UTF-8 | |
| @dot_cycle = ['⣾','⣽','⣻','⢿','⡿','⣟','⣯','⣷'] | |
| #braille random: 0x2800 - 0x28ff | |
| @z_arrow = ['←','↖','↑','↗','→','↘','↓','↙'] | |
| @z_b = ['b','ᓂ','q','ᓄ'] | |
| @z_d = ['d','ᓇ','p','ᓀ'] |
| # http://sayakb.github.io/sticky-notes/pages/install/ | |
| # https://github.com/sayakb/sticky-notes | |
| mkdir /var/www/paste && cd /var/www/paste.domain.tld && git clone https://github.com/sayakb/sticky-notes.git . | |
| chown -Rv www-data:www-data /var/www/paste | |
| cp stickynotes_nginx.conf /etc/nginx/sites-enabled/paste.domain.tld | |
| ln -s /etc/nginx/sites-available/paste.domain.tld /etc/nginx/sites-enabled/. | |
| /etc/init.d/nginx reload | |
| cd /var/www/paste.domain.tld/app/config | |
| mv database.sample.php database.php |
The following is mostly taken from the example published at https://mkaz.com/2013/07/03/run-script-at-start-on-debian/
Write an init.d script according to the the dependency-booting specification (see at https://wiki.debian.org/LSBInitScripts).
, say it foo.sh. Place the script under /etc/init.d.
ln -s /root/scripts/foo.sh /etc/init.d/foo
Update the runlevel directories under /etc/rc*:
update-rc.d foo defaults