- SC1000 $ is not used specially and should therefore be escaped.
- SC1001 This
\o
will be a regular 'o' in this context. - SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
- SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
- SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
- SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
- SC1009 The mentioned parser error was in ...
- SC1010 Use semicolo
[$github, $bitbucket] | |
| (flatten) as $all_projects | |
| ([$all_projects[] | select(.stats.languages != null).stats.languages | to_entries] | flatten) as $langstats | |
| ( | |
[ | |
$all_projects[] | |
| select(.stats.languages != null).stats.languages | |
| keys | |
] | |
| flatten |
/** | |
* Export all data from an IndexedDB database | |
* | |
* @param {IDBDatabase} idbDatabase The database to export from | |
* @return {Promise<string>} | |
*/ | |
export function exportToJson(idbDatabase) { | |
return new Promise((resolve, reject) => { | |
const exportObject = {} | |
if (idbDatabase.objectStoreNames.length === 0) { |
#!/bin/bash | |
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment | |
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen | |
echo "LANG=en_US.UTF-8" | sudo tee -a /etc/locale.conf | |
sudo locale-gen en_US.UTF-8 |
#requires -version 5.1 | |
#requires -module ActiveDirectory,DNSClient | |
# https://jdhitsolutions.com/blog/powershell/8087/an-active-directory-change-report-from-powershell/ | |
#Reporting on deleted items requires the Active Directory Recycle Bin feature | |
[cmdletbinding()] | |
Param( | |
[Parameter(Position = 0,HelpMessage = "Enter a last modified datetime for AD objects. The default is the last 4 hours.")] | |
[ValidateNotNullOrEmpty()] |
One of the biggest improvements to my terminal experience was the switch from [Bash] to [Zsh]. The reason for this is the astonishing amount of completions provided by the community. As well as something I didn't know of before: menu completion. A mode where you can cycle through the possible values. But like [vim] [Zsh] is quite tough on new users.
Then there was [Fish]. A shell that is more accessible to new users and thus calls itself friendly. But one major catch: the break from [POSIX]. This is actually a good thing yet the lack of completions at the time prevented me to make the switch.
Now there is a new generation of shells that allow passing structured data through a pipe. This is a major thing and well worth its own article.
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect
import requests | |
import json | |
from bs4 import BeautifulSoup | |
# To run, just do python3 twitter_wayback_scrape.py | |
# Shout out @JordanWildon for the idea https://archive.ph/xEGPF | |
# Main function |
This gist is an ES module which provides functions to import and export data from an IndexedDB database as JSON. It's based on Justin Emery's indexeddb-export-import
package, but applies some adjustments that reflect better on the current browser landscape (i.e. better developer ergonomics but no support for Internet Explorer).
For each of the provided functionalities, you need a connected IDBDatabase
instance.
import { idb } from 'some-database'
#!/bin/sh | |
# Git proxy settings | |
echo "Configuring Git for compatibility with ZScaler..." | |
git config --global http.proxy http://gateway.zscaler.net:80/ | |
git config --system http.proxy http://gateway.zscaler.net:80/ |