Skip to content

Instantly share code, notes, and snippets.

@cwschroeder
cwschroeder / MQTT Client
Last active May 27, 2024 15:58
Example of a C# MQTT client
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
@spinxz
spinxz / ddclient.conf
Created June 20, 2015 15:52
ddclient configuration file with support for upnp compatible routers or modems (e.g. Huawei HiLink modem)
# Configuration file for ddclient
#
# /etc/ddclient.conf
#
# ddclient configuration for servers behind a UPNP compatible NAT router or modem
#
# 1. Install ddclient, ssl support and upnpclient : sudo apt-get install ddclient libio-socket-ssl-perl miniupnpc
# 2. Copy this configuration file to /etc/ddclient.conf
# 3. Adapt the configuration below (especially the <...> fields)
@csh
csh / ServerPing.cs
Last active September 11, 2023 05:13
Server ping written in C#, complete with coloured console output.
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using Newtonsoft.Json;
#if DEBUG
using System.Diagnostics;
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory