I think I just found the easiest and cleanest way to add precise dates to my bash prompt:
PS0=">>> \$(date +%T.%3N)\\n$PS0"
PROMPT_COMMAND='echo "<<<" $(date +%T.%3N);'$PROMPT_COMMAND
# Path for openSuSE – may be different in other distributions | |
source /usr/share/bash-completion/completions/git-prompt.sh | |
# taken from https://github.com/qupada/git-bashrc/blob/master/git-bashrc | |
_in_git_repo () { | |
# Check the current dir is actually a repository | |
git status &> /dev/null || return 2 | |
# If we are not on a branch we will get annoying errors if we don't do this check | |
git branch | grep -qE '^\* \((no branch|detached from .*)\)' && return 1 | |
return 0 |
import { useState, useCallback } from "react"; | |
function useToggle(initialValue = false){ | |
// State with initial boolean value (true/false) | |
const [state, setState] = useState(initialValue); | |
// Let's create a toggle function | |
// This works, but we're using the state value from above | |
// instead of the current state. Usually they are the same, | |
// but if this hook was triggered multiple times rapidly then |
I think I just found the easiest and cleanest way to add precise dates to my bash prompt:
PS0=">>> \$(date +%T.%3N)\\n$PS0"
PROMPT_COMMAND='echo "<<<" $(date +%T.%3N);'$PROMPT_COMMAND
Amplifr’s rules for landing pages created by outsource.
async function processPens(pens) { | |
for (let pen of pens) { | |
await processPen(pen); | |
} | |
} | |
async function processPen(pen) { | |
await page.goto(url); | |
await page.waitForSelector(FORK_SELECTOR); | |
await page.click(FORK_SELECTOR); |
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger(); |
let items = new Intl.PluralRules('ru-RU'); | |
let result,word; | |
for(var i = 0;i<25;i++){ | |
if(items.select(i)=='one'){ | |
word = 'шаурма'; | |
} | |
if(items.select(i)=='few'){ | |
word = 'шаурмы'; | |
} | |
if(items.select(i)=='many'){ |
Given a subscribed calendar with a url like
https://example.com/example.ics
To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like
https://example.com/example.ics#1
Adding the anchor tag will force Google Calendar to think of it as a new calendar
#!/usr/bin/env node | |
console.log('yay gist') |