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
// ==UserScript== | |
// @name Tooting on Mastodon | |
// @namespace Violentmonkey Scripts | |
// @match https://mastodon.nz/* | |
// @grant none | |
// @version 1.0 | |
// @author Keith Nicholas | |
// @description 10/11/2022, 3:42:31 pm | |
// ==/UserScript== |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<link rel="icon" href="/favicon.ico" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Vite App</title> | |
</head> | |
<body> | |
<div id="app"></div> |
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
using System; | |
using System.Collections.Immutable; | |
namespace ConsoleDU | |
{ | |
record CartItem(string Value); | |
record Payment(decimal Amount); | |
abstract record Cart |
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
private string _name; | |
public string Name | |
{ | |
get { return _name; } | |
set { _name = value; } | |
} |
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
return new Item() | |
{ | |
Name = addName, | |
Weight = int32.Parse(addWeight), | |
Value = int32.Parse(addValue) | |
}; |
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
return new Item() | |
{ | |
Name = addName, | |
Weight = int32.Parse(addWeight), | |
Value = int32.Parse(addValue) | |
}; |
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> | |
<header> | |
<div class="Logo"> | |
<img src="../assets/logo.svg"> | |
</div> | |
<div class="NavBar-Desktop"> | |
<div class=""></div> | |
<div class=""></div> | |
</div> | |
<div class="HamburgerMenu" @click="showMenu = !showMenu"> |
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
using System; | |
namespace Grids | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var grid = new GameGrid(5, 7); | |
grid.Display(); |
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
function myReplace(str, before, after) { | |
let isCapitalized = w => w[0].toUpperCase() === w[0] | |
let capitalize = w => w[0].toUpperCase() + w.slice(1) | |
let lower = w => w[0].toLowerCase() + w.slice(1) | |
let r = [] | |
for(let w of str.split(" ")){ | |
if(w.toLowerCase() === before.toLowerCase()) { | |
r.push(isCapitalized(w)?capitalize(after):lower(after)) | |
} else r.push(w) | |
} |
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
function titleCase(str) { | |
let titled = [] | |
let upper = true; | |
for(let letter of str.toLowerCase()) { | |
titled.push( upper ? letter.toUpperCase() : letter ) | |
upper = (letter === ' ') | |
} | |
return titled.join('') | |
} |
NewerOlder