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.Collections.Specialized; | |
using System.ComponentModel; | |
namespace ThomasJaworski.ComponentModel | |
{ | |
public abstract class ChangeListener : INotifyPropertyChanged, IDisposable | |
{ | |
#region *** Members *** | |
protected string _propertyName; |
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
You can `wget` your way out of the GitHub repo to get a tar file ([archive][1]): | |
wget --no-check-certificate https://github.com/User/repo/archive/master.tar.gz | |
# better, if the certificate authorities are present: | |
wget https://github.com/User/repo/archive/master.tar.gz | |
will get you a file named 'master' from the user 'User''s repo 'repo'. | |
The [updated V3 API url][2] is: |
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
function Show-JobProgress { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory,ValueFromPipeline)] | |
[ValidateNotNullOrEmpty()] | |
[System.Management.Automation.Job[]] | |
$Job | |
, | |
[Parameter()] | |
[ValidateNotNullOrEmpty()] |
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
open System | |
open System.Collections | |
(***************************************************************************** | |
*****************************************************************************) | |
let source = | |
array2D [| |
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
#!/bin/bash -e | |
# Small script to automatically mount/unmount USB drive in WSL | |
usage() { | |
cat << EOF | |
usage: $(basename $0) [-h] [-l] [-u|-m] | |
Options: | |
-h | |
Show this message |
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
@echo off | |
Title .NET Framework 3.5 Offline Installer | |
for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I:\\sources\install.wim" set setupdrv=%%I | |
if defined setupdrv ( | |
echo Found drive %setupdrv% | |
echo Installing .NET Framework 3.5... | |
Dism /online /enable-feature /featurename:NetFX3 /All /Source:%setupdrv%:\sources\sxs /LimitAccess | |
echo. | |
echo .NET Framework 3.5 should be installed | |
echo. |
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
mkdir -p ~/.local/share/fonts | |
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done | |
fc-cache -f |
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
module helpers | |
open System | |
open System.Data | |
type Column = { Name:String; Type:DbType } | |
type Value = { ColumnName:String; Value:obj } | |
type Query = { Type:StatementType; TableName:String; Columns: Value list; IdColumn:string } | |
let SELECT_TEMPLATE:FormattableString = $"SELECT {0} FROM {1}"; | |
let INSERT_TEMPLATE:FormattableString = $"INSERT INTO {0} ({1}) VALUES ({2})"; |
The Boy Scout Rule It’s not enough to write the code well. The code has to be kept clean over time. We’ve all seen code rot and degrade as time passes. So we must take an active role in preventing this degradation. The Boy Scouts of America have a simple rule that we can apply to our profession. 'Leave the campground cleaner than you found it'
NewerOlder