Skip to content

Instantly share code, notes, and snippets.

Sten Hougaard netsi1964

Block or report user

Report or block netsi1964

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@netsi1964
netsi1964 / generateSelectors.js
Last active Jun 2, 2019
Create list of selectors for all elements on a page
View generateSelectors.js
const html = [...document.querySelectorAll("*")]
.map(e => {
let html = "";
let ee = e,
id = "",
unique = false;
let selectors = [];
while (ee.parentNode && !id && !unique) {
const classes = [...ee.classList].sort().join(".");
const id = ee.getAttribute("id");
View Players.js
const players = [{"team":"FC Midtjylland","country":"Denmark","flag":"Denmark","name":"Lasse Heinze","age":28,"yearOfBith":1986,"position":"Goalkeeper","physique":{"height":"184","weight":"80"}},{"team":"FC Midtjylland","country":"Finland","flag":"Finland","name":"Tim Sparv","age":27,"yearOfBith":1987,"position":"Midtfield","physique":{"height":"194","weight":"84"}},{"team":"FC Midtjylland","country":"Nigeria","flag":"Nigeria","name":"Oluwafemi Ajilore","age":30,"yearOfBith":1984,"position":"Midtfield","physique":{"height":"182","weight":"73"}},{"team":"FC Midtjylland","country":"Denmark","flag":"Denmark","name":"Jim Larsen","age":29,"yearOfBith":1985,"position":"Defence","physique":{"height":"190","weight":"90"}},{"team":"FC Midtjylland","country":"Denmark","flag":"Denmark","name":"Jakob Poulsen","age":31,"yearOfBith":1983,"position":"Midtfield","physique":{"height":"182","weight":"75"}},{"team":"FC Midtjylland","country":"Sweden","flag":"Sweden","name":"Petter Andersson","age":29,"yearOfBith":1985,"position
@netsi1964
netsi1964 / Readme.md
Created Oct 20, 2018
Shortcuts for iOS 12
View Readme.md

Shortcuts for iOS 12

This is a collection of various usefull shortcuts for iOS 12.

Show in maps where photo was taken

Choose a photo and if any location data was inside photo the Apple Maps app will be open with a marker at that location.

@netsi1964
netsi1964 / dabblet.css
Created May 1, 2018
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@netsi1964
netsi1964 / vscode.extensions.txt
Created Apr 11, 2018
Visual Studio Code Extensions
View vscode.extensions.txt
code --install-extension Angular.ng-template
code --install-extension BriteSnow.vscode-toggle-quotes
code --install-extension cssho.vscode-svgviewer
code --install-extension DotJoshJohnson.xml
code --install-extension eamodio.gitlens
code --install-extension EditorConfig.EditorConfig
code --install-extension eg2.tslint
code --install-extension formulahendry.auto-close-tag
code --install-extension formulahendry.auto-rename-tag
code --install-extension formulahendry.code-runner
@netsi1964
netsi1964 / README.md
Last active Apr 11, 2018
Extract data from wiki-pedia
View README.md
@netsi1964
netsi1964 / extractPropsAndValues.js
Last active Feb 15, 2018
Extract props and values to JSON
View extractPropsAndValues.js
// https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty
var props = {}
Array.from(document.querySelectorAll('.propdef')).map(property => {
const pn = property.querySelector('.propdef-title.prop-name');
const propertyName = pn.innerText.replace(/[‘’]/ig, '');
const options = property.querySelector('.propinfo tbody tr td:nth-child(2)').innerText.split(' | ');
props[propertyName] = options;
})
let keys = Object.keys(props);
keys.map(key => {
@netsi1964
netsi1964 / removeBlockingFromSite.js
Created Feb 12, 2018
If a website dont like your add blocker - run this script in the console
View removeBlockingFromSite.js
Array.from(document.querySelectorAll('*')).map(ele => {
if (parseInt(getComputedStyle(ele).zIndex)>0) {
ele.style.display = 'none'
}
})
View A place to share a (360 degree) images.md

A place to share (360 degree) images

Before I used to use Dropbox with the Public folder to share stuff, but it has become difficult now I think. So I try using gists, following this description.

@netsi1964
netsi1964 / removeAddBlockerOverlay.js
Created Oct 5, 2017
Run this in console to remove request to disable add blocker
View removeAddBlockerOverlay.js
Array.from(document.querySelectorAll('*')).map(ele => {ele.style.overflow = 'inherit';getComputedStyle(ele).zIndex>0 ? ele.remove() : null})
You can’t perform that action at this time.