Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
USE [master] | |
--Get logical names first | |
EXEC sp_restore_filelistonly | |
@device_type = 'DISK', | |
@backup_path = '/var/opt/mssql/data/DB.bak' | |
--Then restore | |
RESTORE DATABASE MarcRecordsDB | |
FROM DISK = '/var/opt/mssql/data/DB.bak' |
This file contains 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
//first step | |
document.location = "https://nota.dk/om-nota/kontakt?department=206185" | |
//second step | |
names = [];terrorists=[]; monks = [];janitors =[]; | |
document.querySelectorAll(".node--corp-employee").forEach((el) => {names.push(el);}); | |
var n = 0 | |
while(names[n]){ | |
rnd = Math.floor(Math.random(3) * Math.floor(3)); |
This file contains 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
rebate = $('.save-wrap .product-price-save'); | |
offer = $('.product-image .product-price-save'); | |
price = $('.price') | |
findRebate = (s) => {el = $(s).find(rebate)[0]; return( !!el)? parseInt(el.innerText.substr(5, 3)) : NaN }; | |
findPrice = (s) => {el = $(s).find(price)[0]; return( !!el)? parseInt(el.innerText) : NaN }; | |
findPercentage = (s) => (findRebate(s)/(findPrice(s) + findRebate(s)) * 100); | |
setText = (s) => {el = $(s).find(offer)[0]; if (!!el) { el.innerText = findPercentage(s).toPrecision(4) + " %" }}; |
This file contains 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
/** | |
*Shadows | |
*/ | |
div{ | |
font: 150%/1 Helvetica, sans serif; | |
float:left; | |
color: blue; | |
margin:0.6em 1em; | |
position:relative; | |
max-width: 13em; |
This file contains 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
/* | |
Corners and borders | |
*/ | |
div{ | |
font: 150%/1 Helvetica, sans serif; | |
float:left; | |
color: blue; | |
margin:2em; | |
position:relative; | |
max-width: 13em; |
This file contains 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
/* | |
Corners and borders | |
*/ | |
div{ | |
font: 150%/1 Helvetica, sans serif; | |
float:left; | |
color: blue; | |
margin:2em; | |
position:relative; | |
max-width: 13em; |
This file contains 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
Just for fun, hidding all shirts that doesn't have breast-pockets. | |
http://www.hawesandcurtis.co.uk/menswear/formal_shirts?fit=39&viewAll=True | |
Vanilla JS: | |
Firefox: | |
[].slice.call(document.getElementsByClassName('standard-product')).filter(x =>!(x.textContent.contains('Pocket'))).forEach(function(el){el.style.display = 'none'}) | |
Edge (No contains): | |
String.prototype.contains = function(stringToSearchFor){return this.indexOf(stringToSearchFor) >-1;} | |
[].slice.call(document.getElementsByClassName('standard-product')).filter(x =>!(x.textContent.contains('Pocket'))).forEach(function(el){el.style.display = 'none'}) | |
Chrome(No fat arrow, no contains): | |
[].slice.call(document.getElementsByClassName('standard-product')).filter(function(el){return el.textContent.indexOf('Pocket') === -1}).forEach(function(el){el.style.display = 'none'}) |