inotifywait -e close_write node-scratch.js -m | while read -r filename ; do node $filename ; done
This file contains hidden or 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 datetime | |
import random | |
import time | |
import colorama | |
fg = [] | |
bg = [] | |
for c in dir(colorama.Fore): | |
if c.startswith("_") == False: |
This file contains hidden or 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
#!/bin/bash | |
GOOGLE_GPG_KEY=/etc/apt/trusted.gpg.d/cloud.google.gpg | |
GOOGLE_CLOUD_CLI_PACKAGE=google-cloud-cli | |
BRIGHT_WHITE_ON_RED="\\033[1;97;41m" | |
CLEAR_COLOURS="\\033[0m" | |
if [ $EUID -ne 0 ]; then | |
echo -e "$BRIGHT_WHITE_ON_RED $CLEAR_COLOURS" |
This file contains hidden or 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 your enum | |
public enum Size { Small, Medium, Large } | |
// Class with an enum property | |
public class Product | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
// Apply StringEnumConverter attribute to control JSON serialization |
This file contains hidden or 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
#!/bin/bash | |
# summon with | |
# curl https://gist.githubusercontent.com/AdrianJMartin/34a98dfa1ebc207a04907eb92108137e/raw/get-latest-nodejs-lts.sh -LsO | |
BRIGHT_WHITE_ON_RED="\\033[1;97;41m" | |
CLEAR_COLOURS="\\033[0m" | |
if [ $EUID -ne 0 ]; then |
This file contains hidden or 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
let c = [ "mid-outbrain" , "ob-","AdW" , "AdC", "seedtag", "x-to-close" ]; | |
let i = [ "MPU","adunit" ,"seedtag" ]; | |
c.forEach( sel => document.querySelectorAll(`[class*=${sel}]`).forEach( e => e.remove() ) ); | |
i.forEach( sel => document.querySelectorAll( `[id*=${sel}]`).forEach( e => e.remove() ) ); |
This file contains hidden or 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
#include <algorithm> | |
#include <cstdint> | |
#include <iomanip> | |
#include <iostream> | |
#include <list> | |
#include <numeric> | |
#include <ranges> | |
#include <string> | |
#include <vector> |
This file contains hidden or 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 createRandomSentence(): String { | |
const randomWords = [ | |
"apple", "banana", "cherry", "date", "elderberry", "fig", "grape", "honeydew", "kiwi", "lemon", | |
"mango", "nectarine", "orange", "papaya", "quince", "raspberry", "strawberry", "tangerine", "ugli", "vanilla", | |
"watermelon", "xigua", "yellowfruit", "zucchini", "apricot", "blueberry", "cantaloupe", "dragonfruit", "eggplant", "fennel", | |
"ginger", "huckleberry", "iceberg", "jicama", "kale", "lime", "mushroom", "nutmeg", "olive", "pear", |