Skip to content

Instantly share code, notes, and snippets.

@Refhi
Refhi / nextcloud-snap-backup.sh
Last active April 25, 2020 21:13 — forked from kapcom01/nextcloud-snap-backup.sh
Nextcloud 13 snap backup script
#! /bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
user=refhi
backups=/home/refhi/backups
if [[ $EUID > 0 ]]
then echo "Please run as root"
exit
fi
var attempts = 1;
function createWebSocket () {
var connection = new WebSocket();
connection.onopen = function () {
// reset the tries back to 1 since we have a new connection opened.
attempts = 1;
// ...Your app's logic...
@hurjas
hurjas / timestamp.js
Created May 11, 2012 15:35 — forked from jonkemp/timestamp.js
Print out a nicely formatted timestamp in JavaScript.
/**
* Return a timestamp with the format "m/d/yy h:MM:ss TT"
* @type {Date}
*/
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, day and time