Skip to content

Instantly share code, notes, and snippets.

@shawnli87
shawnli87 / workupload_download.sh
Created August 27, 2022 04:47 — forked from rexlManu/workupload_download.sh
Download workupload files via curl
#!/bin/bash
[ -z "$1" ] && echo "Usage: workupload_download.sh '<workupload link>'" && exit 1
id_string=$(sed 's|.*workupload.com/||g' <<< "$1")
type=$(cut -d'/' -f1 <<< "$id_string")
id=$(cut -d'/' -f2 <<< "$id_string")
[[ "$type" != "file" ]] && [[ "$type" != "archive" ]] && echo "Invalid link provided" && exit 1
@braian87b
braian87b / openwrt-lede-on-wd-mbl.sh
Last active October 22, 2023 12:58
Install OpenWRT or LEDE on WD MBL Western Digital MyBookLive
# Instructions to Install OpenWRT or LEDE on WD MBL Western Digital MyBookLive (Tested on Single, but it should work on Duo too)
# ------------------------------------------------------------------------------------
# Initial preparation (Using a Debian VM)
# ------------------------------------------------------------------------------------
# Recommended to use a Linux / Debian box with wget, dd, gunzip, lsblk
# Using a Debian box (it could be a VM) with the harddrive connected (it could be a minimal net-install Debian)
See ip with:
ip addr show
@eonarheim
eonarheim / AdminRestApi.ps1
Last active August 12, 2022 21:08
PowerShell DSC Configuration for the new Microsoft IIS.Administration Rest API
configuration AdminRestAp {
Import-DscResource -ModuleName xPSDesiredStateConfiguration
Import-DscResource -ModuleName xNetworking
Node "webserver" {
<#
Install windows features
#>
WindowsFeature InstallIIS {
@karoltheguy
karoltheguy / ObservableDictionary.cs
Created March 3, 2017 17:34
Observable Dictionary
public class ObservableDictionary<TKey, TValue> : IDictionary<TKey, TValue>, INotifyCollectionChanged, INotifyPropertyChanged
{
private const string CountString = "Count";
private const string IndexerName = "Item[]";
private const string KeysName = "Keys";
private const string ValuesName = "Values";
private IDictionary<TKey, TValue> _Dictionary;
protected IDictionary<TKey, TValue> Dictionary
{
@kzu
kzu / ObservableDictionary.cs
Last active October 6, 2023 11:01
An ObservableDictionary<TKey, TValue>
// Licensed by Daniel Cazzulino under the MIT License
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Dynamic;
using System.Linq;
using System.Text;