— Clone repository with submodules automatically:
git clone --recursive git@github.com:name/repo.git
— Initialize submodules after regular cloning:
#!/usr/bin/env bash | |
mkdir /etc/nginx/ssl 2>/dev/null | |
PATH_SSL="/etc/nginx/ssl" | |
PATH_KEY="${PATH_SSL}/${1}.key" | |
PATH_CSR="${PATH_SSL}/${1}.csr" | |
PATH_CRT="${PATH_SSL}/${1}.crt" | |
if [ ! -f $PATH_KEY ] || [ ! -f $PATH_CSR ] || [ ! -f $PATH_CRT ] |
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var styleEl = document.getElementById('css-layout-hack'); | |
if (styleEl) { | |
styleEl.remove(); | |
return; | |
} | |
styleEl = document.createElement('style'); | |
styleEl.id = 'css-layout-hack'; |
setInterval(function hello() { | |
console.log('world'); | |
return hello; | |
}(), 5000); |
function setInputField(selector, value) | |
{ | |
return new Promise(function(resolve, reject) { | |
object = this.document.querySelector(selector); | |
if (!object) { | |
reject(false); | |
} | |
document.querySelectorAll(selector).forEach(function (t) { | |
Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set.call(t, value); |
// Hack for remove pre-set background for autofilled input values | |
.form-control, | |
input { | |
&:-webkit-autofill, | |
&:-webkit-autofill:hover, | |
&:-webkit-autofill:focus, | |
&:-webkit-autofill:active { | |
background-color: transparent !important; | |
-webkit-box-shadow: 0 0 0 1000px transparent inset; | |
-webkit-transition-property: background-color !important; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
i { | |
border: solid black; | |
border-width: 0 3px 3px 0; | |
display: inline-block; | |
padding: 3px; |
//https://html-online.com/articles/get-url-parameters-javascript | |
function getUrlVars() { | |
var vars = {}; | |
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { | |
vars[key] = value; | |
}); | |
return vars; | |
} | |
var mytext = getUrlVars()["text"]; |
<!--smar7apps gdpr--> | |
<script>$(document).ready(function(){localStorage.getItem("s7gdpr")||$(".s7gdpr").css("display","flex"),$(".s7gdpr-btn").on("click",function(){localStorage.setItem("s7gdpr",1),$(".s7gdpr").hide()})});</script> | |
<style>.s7gdpr{display:none;position:fixed;left:0;right:0;bottom:0;background-color:rgba(66,28,166,0.95);background-image: linear-gradient(198deg, #2e42ba, #4250a6);padding:10px;color:rgba(255,255,255,1);z-index:1000;align-items:center;justify-content:flex-end}.s7gdpr-text{font-size: 0.9em;justify-self:flex-start;margin-right:auto}.s7gdpr a{color:rgba(255,255,255,0.9);text-decoration:underline}.s7gdpr a:hover{color:rgba(255,255,255,1)}.s7gdpr-btn{cursor:pointer;margin-left:20px;padding:5px 15px;border:1px solid rgba(255,255,255,0.9);font-size:.9em;color:rgba(255,255,255,0.9);white-space:nowrap;border-radius:3px}.s7gdpr-btn:hover{border:1px solid rgba(255,255,255,1);color:rgba(255,255,255,1)}</style> | |
<div class="s7gdpr"> | |
<div class="s7gdpr-text"> | |
We use cookies to person |
function isFunction(functionToCheck) { | |
return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]'; | |
} |