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://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"version": 2, | |
"final_space": true, | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"segments": [ | |
{ |
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
{ | |
"background": "#282828", | |
"black": "#504945", | |
"blue": "#458588", | |
"brightBlack": "#7C6F64", | |
"brightBlue": "#83A598", | |
"brightCyan": "#8EC07C", | |
"brightGreen": "#B8BB26", | |
"brightPurple": "#D3869B", | |
"brightRed": "#FB4934", |
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
/* | |
* Change detection for forms | |
* | |
* @author Mark Embling | |
* | |
* Initialise on applicable forms using the jQuery plugin. | |
* Recommended one per page but this is not a requirement. | |
* | |
* Copyright © 2022 Mark Embling | |
* |
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
# Add this into your profile AFTER posh-git has been loaded and the SSH agent | |
# has been started. | |
[void][Environment]::SetEnvironmentVariable("SSH_AGENT_PID", [Environment]::GetEnvironmentVariable("SSH_AGENT_PID"), [EnvironmentVariableTarget]::User) | |
[void][Environment]::SetEnvironmentVariable("SSH_AUTH_SOCK", [Environment]::GetEnvironmentVariable("SSH_AUTH_SOCK"), [EnvironmentVariableTarget]::User) | |
# It may make it a little slower (as apparently writing to the user environment | |
# is slow), but will mean the SSH agent is visible to other processes. |
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
{ | |
"editor.rulers": [ | |
80, | |
120 | |
], | |
"editor.renderWhitespace": "boundary", | |
"editor.minimap.enabled": true, | |
"editor.minimap.renderCharacters": false, | |
"editor.dragAndDrop": true, | |
"files.hotExit": "off", |
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
######################################### | |
# Convenient PowerShell Alias functions # | |
######################################### | |
# Open the given directory in Explorer | |
# Usage: open . | |
function open { | |
explorer $args | |
} |
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
// Mostly cribbed together from https://gist.github.com/mathewbyrne/1280286 | |
// Also: http://stackoverflow.com/questions/1144783/how-to-replace-all-occurrences-of-a-string-in-javascript | |
function _escapeRegex(str) { | |
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | |
} | |
function slugify(str) { | |
str = str.trim(); | |
str = str.toLowerCase(); |
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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Reflection; | |
namespace ConsoleApplication1 { | |
class Program { | |
static void Main(string[] args) { | |
Console.WriteLine("CLR"); | |
Console.WriteLine(Environment.Version); |
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
mark@silicon:~$ sudo pip install blinkstick | |
Downloading/unpacking blinkstick | |
Downloading BlinkStick-0.7.0.tar.gz | |
Running setup.py egg_info for package blinkstick | |
Downloading/unpacking grapefruit==0.1a3 (from blinkstick) | |
You are installing an externally hosted file. Future versions of pip will default to disallowing externally hosted files. | |
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files. | |
Downloading grapefruit-0.1a3.tar.gz (194kB): 194kB downloaded | |
Running setup.py egg_info for package grapefruit |
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
import mosquitto | |
client = mosquitto.Mosquitto("can-haz-msg") | |
client.connect("mqtt.example.com") | |
client.subscribe("my-topic") | |
for msg in client.wait_for_next_message(): | |
print msg.payload |
NewerOlder