Skip to content

Instantly share code, notes, and snippets.

View JuenTingShie's full-sized avatar
🧑‍💼
Working in Taiwan

JuenTingShie JuenTingShie

🧑‍💼
Working in Taiwan
View GitHub Profile
@lukebakken
lukebakken / rmq-passwd-gen
Last active January 24, 2025 03:53
RabbitMQ - Create Hashed User Password
#!/usr/bin/env bash
set -o errexit
set -o nounset
declare -r passwd="${1:-newpassword}"
declare -r tmp0="$(mktemp)"
declare -r tmp1="$(mktemp)"
@jcoutch
jcoutch / Generate-SignalrProxy.ps1
Last active July 9, 2024 10:40
Generate a SignalR hub proxy (taking into account any binding redirects in your project)
# This script is designed to be ran as a post-build step.
# If running directly, make sure you're in the root of your project's folder.
# This project also relies on the Microsoft.AspNet.SignalR.Utils package to be
# installed in your project, and packages restored prior to running this script
# Modify the variables below to correspond with your build settings
$packagesFolder = "..\packages" # Your NuGet packages
$appConfigFile = "app.config" # Your app/web.config to grab binding redirects from
$outputDir = "bin\debug" # The build output directory containing your SignalR hubs
@BalzGuenat
BalzGuenat / terraria_tutorial.md
Last active February 5, 2024 03:24
Installing and running a Terraria server with tShock on a Raspberry Pi

Installing and running a Terraria server with tShock on a Raspberry Pi

This was originally posted here on reddit. If you decide to try this, please post a comment either confirming that it works or stating any issues that came up. Thanks to reddit user /u/mat_storm1 for pointing out some typos and thanks to reddit user /u/supercore23 for pointing out potential issues with spaces in the world path.

What is this?

This guide explains how to install and run a Terraria server on your Raspberry Pi. I assume you have already installed Raspbian and have a very basic understanding of the command line. Installation on other Unix-based systems should be very similar. The goal is to reach a setup that only requires you to plug in your Pi to start the server. Connecting to the server should be easily done by using a hostname, not an IP. We should also be able to ssh into the server and do server-admin stuff at any t

@DanielSWolf
DanielSWolf / Program.cs
Last active November 9, 2025 21:44
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@joyrexus
joyrexus / README.md
Last active November 19, 2025 15:18 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@leandrosilva
leandrosilva / Client.cs
Created October 31, 2010 02:54
Asynchronous Client/Server Socket Example with C# (from MSDN library)
// Asynchronous Client Socket Example
// http://msdn.microsoft.com/en-us/library/bew39x2a.aspx
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Text;
// State object for receiving data from remote device.