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
#!/usr/bin/env bash | |
# Run 'apt update' and print every (nonempty) line except the last one with the suggestion to run | |
# 'apt list --upgradable'. | |
# In fact we do as suggested instead. :) | |
apt update 2>&1 | \ | |
awk ' | |
BEGIN { eatnextemptyline = 0 } | |
/^$/ { if (eatnextemptyline) { eatnextemptyline = 0; next } } | |
/WARNING: apt does not have a stable CLI interface. Use with caution in scripts./ { eatnextemptyline = 1; next } |
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
# (jkniiv, 2018-08-16) replace C-b by C-x instead of using both prefixes | |
# The reason I use Ctrl-x with tmux is that it's comfortable and it works fine with nano and others (not a vim guy). | |
# Ok, so it conflicts with nano's exit function but that's just a plus in my view to have to issue a double C-x to exit :) | |
set -gu prefix2 | |
unbind C-a | |
unbind C-b | |
set -g prefix C-x | |
bind C-x send-prefix |
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 Aliexpress | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://trade.aliexpress.com/orderList.htm* | |
// @grant unsafeWindow | |
// @grant GM_xmlhttpRequest | |
// @grant GM_setClipboard |
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
<?xml version="1.0" ?> | |
<dpinst> | |
<search> | |
<subDirectory>*</subDirectory> | |
</search> | |
<scanHardware/> | |
<quietInstall/> | |
</dpinst> |
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
# Returns a visual list via PowerShell's Out-GridView of all the "scope rules" for the standard search index | |
# in Windows Search. These are objects that represent files and folders to be included in or excluded from | |
# the search index while Windows Search is indexing (also called "crawling") your files. | |
# This code is basically from here (except for some re-formatting and new comments by me [Jarkko Kniivilä aka | |
# 'jkniiv']): | |
# https://powertoe.wordpress.com/2010/05/17/powershell-tackles-windows-desktop-search/ | |
# See also the following script (not mine) for inspiration if you're interested: | |
# https://github.com/IntelliTect/PSToolbox/blob/master/Functions/WindowsSearchIndex.ps1 | |
# Load the dll (easiest to be found here https://github.com/IntelliTect/PSToolbox/tree/master/Lib) |
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
# Gets the URL that is currently being indexed by Windows Search via | |
# the ISearchCatalogManager::URLBeingIndexed() method. | |
# N.B. This needs to be called elevated, i.e. with admin privileges! | |
# Load the dll (easiest to be found here https://github.com/IntelliTect/PSToolbox/tree/master/Lib) | |
Add-Type -Path .\Microsoft.Search.Interop.dll | |
$searchManager = New-Object Microsoft.Search.Interop.CSearchManagerClass | |
$catalog = $searchManager.GetCatalog("SystemIndex") |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
"profiles": | |
[ | |
{ | |
// Make changes here to the powershell.exe profile | |
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", |
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
BEGIN { | |
# drive = "E"; | |
print "* The ‘drive’ parameter as specified was ‘" drive "’ (variable value in single quotes)"; | |
# print "* Searching for all references to " drive ":\\ in the third column of the input"; | |
} | |
/pid:/ { | |
pidline = $0; | |
} |
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
#!/usr/bin/env python3 | |
# --- | |
# Copyright 2020 glowinthedark | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# | |
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, |