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
# define a count variable | |
$count = 0 | |
# get first argument | |
$source = $args[0] | |
mkdir("../$source") | |
Get-ChildItem -Recurse -Filter "*.$source" | ForEach-Object { | |
# $json = Get-Content $_ -Raw | ConvertFrom-Json | |
# $json | ConvertTo-Json | Set-Content $_ | |
Write-Host "Move to: ../$source/$($_.FullName | Split-Path -Leaf)" | |
$_.MoveTo("../$source/$($_.FullName | Split-Path -Leaf)") |
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
<template> | |
<div id="app"> | |
<div class="p-4 g-4 d-flex align-items-center"> | |
<label class="p-0 m-0" for="">Rows</label> | |
<input v-model.number="rows" :min="2" :max="20" type="range" class="form-control ml-2 mr-4 m-0"> | |
<label class="p-0 m-0" for="">Columns</label> | |
<input v-model.number="cols" min="2" step="1" max="20" type="range" class="form-control ml-2 m-0"> | |
<button class="btn btn-primary ml-4" @click="regenKey">Regenerate!</button> | |
</div> | |
<table class="table-bordered" :key="key"> |
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
var song = document.body.querySelectorAll( ".dropdown-trigger.ytmusic-menu-renderer" ) | |
for ( var i = 0; i < song.length; i++ ) { | |
song[i].click(); var dropdown = document.body.querySelector( "ytmusic-menu-popup-renderer[slot='dropdown-content']" ) | |
if ( dropdown != undefined ) { | |
var items = dropdown.querySelector( "tp-yt-paper-listbox#items" ).querySelectorAll( "ytmusic-menu-service-item-renderer" ) | |
if ( items != null ) { | |
items.forEach( async ( element ) => { | |
if ( element.querySelector( 'yt-formatted-string' ).innerHTML == 'Remove from playlist' ) { |
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
... | |
'padding-line-between-statements': [ | |
'error', | |
{ | |
blankLine: 'always', | |
prev: [ | |
'multiline-const', 'multiline-let', 'multiline-var', 'multiline-block-like', 'return', 'multiline-expression', | |
], | |
next: '*', | |
}, |
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
fake() { | |
if [[ -z $1 ]]; then | |
echo "Provide a chance generator:" | |
exit 1 | |
fi | |
tocopy=$(chance "$@") | |
echo $tocopy | |
echo $tocopy | tr -d '\n' | pbcopy | |
echo "\nCopied to Clipboard!" | |
} |
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
const dynamicMiddleware = require( 'express-dynamic-middleware' ) | |
const jsonServer = require( "json-server" ) | |
const jsonFile = "db.json" | |
const server = jsonServer.create() | |
let router = jsonServer.router( jsonFile ) | |
let dynamicRouter = dynamicMiddleware.create( router ) | |
const defaults = jsonServer.defaults() |
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
{ | |
"editor.fontSize": 13, | |
"editor.fontFamily": "'JetBrains Mono', monospace", | |
"editor.tabSize": 2, | |
"editor.detectIndentation": false, | |
"editor.renderLineHighlight": "all", | |
"editor.showFoldingControls": "always", | |
"editor.smoothScrolling": true, | |
"editor.stablePeek": false, | |
"emmet.includeLanguages": { |
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
import compareVersions from 'compare-versions'; | |
fetch(process.env.BASE_URL + `version.json?_d=` + encodeURI(new Date().toJSON()), { | |
method: "GET", | |
headers: { | |
"pragma": "no-cache", | |
"cache-control": "no-store" | |
} | |
}) | |
.then(resp => resp.json()) | |
.then(json => { |
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
{ | |
"category": "food", | |
"meter_states": { | |
"quality_control": "status-pending", | |
"preparing": "status-current", | |
"on_the_way": "status-pending" | |
}, | |
"delivery_time": "25", | |
"is_food_order": true, | |
"date_received": "2020-03-13 01:52:01 PM", |
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
const through = require("through2") | |
function changeEnvToDev(val) { | |
return through.obj(function(file, encoding, callback) { | |
if (file.isNull()) return callback(null, file) | |
if (file.isStream()) { | |
//file.contents = file.contents.pipe(... | |
//return callback(null, file); | |
this.emit("error", new Error("Streams not supported!")) |
NewerOlder