This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://habr.com/post/213515/ | |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB, | |
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction, | |
baseName = "baseName", | |
storeName = "storeName"; | |
function logerr(err){ | |
console.log(err); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="//code.jquery.com/jquery-3.3.1.min.js"></script> | |
<title></title> | |
<script type="text/javascript"> | |
$(function(){ | |
$.fn.Myfunc = function(){ | |
this.each(function(){ | |
var className = $(this).attr('class'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# function to generate random password, on input requires an argument - lenght of password | |
genpasswd() { | |
local l=$1 | |
[ "$l" == "" ] && l=20 | |
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs | |
} | |
# MySQL default root password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the queryString module from: | |
// https://github.com/sindresorhus/query-string | |
console.log(location.href); | |
// http://sindresorhus.com/?foo=bar | |
console.log(location.search); | |
// ?foo=bar | |
var parsed = queryString.parse(location.search); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$(whoami)" != "root" ]; then | |
echo "Run script as ROOT please. (sudo !!!)" | |
exit | |
fi | |
# ------------------------------ | |
if [ -z "$JAVA_HOME" ]; then | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
############################################################## | |
# This script was created by Hernan Dario Nacimiento based on: | |
# http://guacamole.incubator.apache.org/releases/0.9.13-incubating/ | |
# http://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/ | |
# http://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/administration.html | |
# http://nginx.org/en/docs/http/configuring_https_servers.html | |
# http://nginx.org/en/docs/http/ngx_http_spdy_module.html | |
# https://wiki.centos.org/AdditionalResources/Repositories | |
# Task of this script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#https://pimylifeup.com/raspberry-pi-nextcloud-server/ | |
#https://stackoverflow.com/questions/13322485/how-to-get-the-primary-ip-address-of-the-local-machine-on-linux-and-os-x | |
#https://unix.stackexchange.com/questions/293940/bash-how-can-i-make-press-any-key-to-continue | |
#https://stackoverflow.com/questions/638975/how-do-i-tell-if-a-regular-file-does-not-exist-in-bash | |
#https://www.cyberciti.biz/faq/bash-infinite-loop/ | |
#https://stackoverflow.com/questions/2379829/while-loop-to-test-if-a-file-exists-in-bash | |
if [ "$(whoami)" != "root" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#http://www.m-opensolutions.com/?p=936 | |
if [ "$(whoami)" != "root" ]; then | |
echo "Run script as ROOT please. (sudo !!!)" | |
exit | |
fi | |
# Disable Wi-Fi and Bluetooth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#http://www.ekzorchik.ru/2017/09/print-server-cups-on-raspberry-pi-3/ | |
#https://habrahabr.ru/post/328576/ | |
#https://wiki.debian.org/ru/HowTo/ChangeHostname | |
#http://help.ubuntu.ru/wiki/сканеры_решение_общих_проблем_с_подключением | |
#http://www.sane-project.org/sane-mfgs.html#Z-CANON | |
#https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/ | |
#https://wiki.contribs.org/SANE | |
#https://dev.shyd.de/2011/03/debian-printserver-scanserver-hplip-cups-sane/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/ | |
#https://askubuntu.com/questions/762702/failed-to-start-saned-service-unit-saned-service-is-masked | |
#http://www.ekzorchik.ru/2017/09/print-server-cups-on-raspberry-pi-3/ | |
#https://habrahabr.ru/post/328576/ | |
#https://wiki.debian.org/ru/HowTo/ChangeHostname | |
#http://help.ubuntu.ru/wiki/сканеры_решение_общих_проблем_с_подключением | |
#http://www.sane-project.org/sane-mfgs.html#Z-CANON | |
#https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/ |