Skip to content

Instantly share code, notes, and snippets.

.debug *:nth-child(4n+1) {
/* border: 1px solid blue !important; */
background-color: rgb(86, 111, 149);
background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, .5) 35px, rgba(255, 255, 255, .5) 70px);
outline: 1px rgb(57, 136, 255) solid;
outline-offset: -1px;
box-shadow: inset 0px 0px 22px -3px rgb(0, 26, 56);
}
.debug *:nth-child(4n+2) {
@martinandersen3d
martinandersen3d / VisualStudioBackupExtension.ps1
Created February 11, 2020 20:43
Backup Visual Studio Extensions names Powershell
# find "extension.vsixmanifest" files
# $directory = "C:\Users\Martin\AppData\Local\Microsoft\VisualStudio\16.0_b91ee7f2\Extensions"
$directory = "$($env:LOCALAPPDATA)\Microsoft\VisualStudio\"
Write-Output "---BACKUP VISUAL STUDIO EXTENSIONS---"
Write-Output $directory
Write-Output "-------------------------------------"
get-childitem $directory -recurse | where {$_.extension -eq ".vsixmanifest"} | % {
@martinandersen3d
martinandersen3d / vscode hotkeys generate PNG HTLM PDF from hotkeys.js
Last active January 10, 2020 01:43
vscode hotkeys - Generate PNG, HTML, PDF from your custom hotkeys in vscode
const fs = require('fs');
const strip = require('strip-comments');
const puppeteer = require('puppeteer');
var content = fs.readFileSync('keybindings.json', 'utf8');
let removeComment = strip(content);
// Remove trailing commas in json:
let regex = /\,(?!\s*?[\{\[\"\'\w])/g;
let input = removeComment; // this is the initial string of data
@martinandersen3d
martinandersen3d / gist:5b4425d08acd8e9eb8123180f446bfda
Last active December 26, 2019 02:19 — forked from henriquemoody/http-status-codes.php
List of HTTP status codes in PHP
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
**/
return array(
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing', // WebDAV; RFC 2518
200 => 'OK',
//Array reduce method
//reduce all the values in an array into a single result
// Uses a callback function just like map, forEach, filter, etc
// array.reduce(callback, initialValue)
// also has a second parameter which is an initialValue
let numbers = [12, 34, 56, 78, 91];
//find the sum of all the numbers
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>LuxonJS The Modern MomentJS</title>
<meta name="viewport" content="width=device-width">
<style>
#output{
font-size: 2rem;
}
//Array custom sort() function
let log = console.log;
let movies = ['Star Wars', 'Star Trek', 'Jaws', 'Jurassic Park', 'Gross Pointe Blank', 'Eternal Sunshine of the Spotless Mind', 'Memento', 'Dog Soldiers', 'The Host', 'Gran Torino', 'Close Encounters of the Third Kind', 'Good Will Hunting', 'Layer Cake', 'Casino Royale', 'Almost Famous'];
let numbers = [40,16,67,345,22,23,142,63,59,283];
let people = [
{"id":123, "name":"Rick Deckard", "email":"[email protected]"},
{"id":456, "name":"Roy Batty", "email":"[email protected]"},
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>HTML inputmode attribute</title>
<style>
* {
padding: 0;
# Git aliases
alias gs="git status"
alias ga="git add"
alias gaa="git add ."
alias gc="git commit"
alias gp="git push"
alias gpl="git pull"
alias gcm="git commit -m"
alias gl="git log"
@martinandersen3d
martinandersen3d / VS Code JSON Settings
Created December 14, 2019 05:59 — forked from uysalserkan/VS Code JSON Settings
JSON settings instpiration
{
// Most Commonly Used
// Controls auto save of dirty files. Accepted values: 'off', 'afterDelay', 'onFocusChange' (editor loses focus), 'onWindowChange' (window loses focus). If set to 'afterDelay', you can configure the delay in 'files.autoSaveDelay'.
"files.autoSave": "off",
// Controls the font size in pixels.
"editor.fontSize": 14,
// Controls the font family.