<file> ::= ( <statement> | <comment> | <block> )+
<statement> ::= <anytext>+ "\n"+
<comment> ::= "::" <anytext>+ "\n"+
<block> ::= "(" "\n"+ ( <comment> <statement> | <statement> | <block> )+ ")" "\n"+
<anytext> ::= #"[a-z0-9 ]"
<blockerror> ::= "{" "\n"+ ( <comment> <statement> | <statement> | <block> )+ "}" "\n"+
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
try | |
{ | |
var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var shell = new ActiveXObject("WScript.Shell"); | |
var READ = 1, WRITE = 2, APPEND = 8; | |
var TEXT_DEFAULT = -2, TEXT_UNICODE = -1, TEXT_ANSI = 0; | |
var argc = WScript.Arguments.Count(); | |
if (argc < 4) | |
{ |
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
# Run: | |
# sudo apt-get install gnupg-agent | |
# sudo apt-get install pinentry-curses | |
# Edit: | |
# $HOME/.gnupg/gpg-agent.conf: | |
# pinentry-program /usr/bin/pinentry-curses | |
# default-cache-ttl 28800000 | |
# max-cache-ttl 28800000 | |
# Edit: | |
# $HOME/.subversion/config: |
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
#!/usr/bin/env python | |
# Copyright (c) 2019, Giampaolo Rodola', Michael Clark. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# https://github.com/giampaolo/psutil/blob/master/LICENSE | |
""" | |
In liu of a 'renice' cmdline utility on Windows. | |
$ winrenice chrome.exe below |
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
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Folder\shell\cmdhere] | |
[-HKEY_CLASSES_ROOT\Directory\Background\shell\cmdhere] |
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/sh | |
SOURCE_URL="https://raw.githubusercontent.com/rupa/z/master/z.sh" | |
OUTPUT_LOC="$HOME/.z.sh" | |
usage_doc="Usage: $0 [-h] [-u url] [-o file] | |
-h this help | |
-u <url> download from <url> | |
default: $SOURCE_URL | |
-o <file> download to <file> |
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/sh | |
decl_outside="assigned outside a function" | |
echo "printing from outside: \$decl_outside: value before assignment INSIDE a function: [$decl_outside]" | |
INSIDE1() { | |
echo "printing from INSIDE1(): \$decl_outside: value before assignment by INSIDE1(): [$decl_outside]" | |
decl_outside="assigned by INSIDE1()" | |
echo "printing from INSIDE1(): \$decl_outside: value after assignment by INSIDE1(): [$decl_outside]" |
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
git ls-files -z | gxargs -0 dirname | grep -Fxv . | grep -v / | sort -u | gxargs gdu -h --max-depth 0 | sort -h |
(The content of this article is licensed under "CC-BY" which allows you to share, adapt, remix, and republish this work. All that's required is attribution like this: "© CC-BY <link to where you obtained this article>
").
More info at: https://creativecommons.org/licenses/by/4.0/
A PowerShell Design Pattern: Handling Confirmation Prompts in Cmdlets
When writing custom PowerShell Cmdlets, a common scenario arises when your Cmdlet has the SupportsShouldProcess = $true
attribute set to leverage PowerShell’s -Confirm
infrastructure. This attribute enables built-in confirmation prompts that ask the user to verify potentially impactful actions before proceeding.
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 | |
wget -o wget.log -r -np -nH --cut-dirs=2 -P out/ --show-progress \ | |
--reject "index.html*" --reject-regex '\?C=.*' \ | |
https://www.unicode.org/Public/zipped/16.0.0 |