Skip to content

Instantly share code, notes, and snippets.

@joshka
joshka / Readme.md
Last active October 14, 2022 19:32
8/Any pin PIO based UART TX code for a Raspberry Pi Pico
View Readme.md

Raspberry Pi Pico PIO 8 Pin UART TX

This code creates a UART TX on 8 sequential pins of the Raspberry Pi Pico. The main use case being MIDI splitter devices

The second 16 port implementation should work for any number of pins, but just acts as a pure copy to those pins instead of having individual control over every pin of every byte. Hence while less flexible, the controlling software is simpler (just send a uart byte and it's copied to every pin).

Only tested in the simulator so far. https://wokwi.com/projects/344345628967436882

Used https://wokwi.com/tools/pioasm to go from uart_tx.pio.h to uart_tx.h

@joshka
joshka / Global.asax.cs
Created October 14, 2014 05:56
HTTP -> HTTPS redirect and add HSTS header
View Global.asax.cs
// ...
protected void Application_BeginRequest(object sender, EventArgs e)
{
switch (Request.Url.Scheme)
{
case "http":
RedirectToHttps();
break;
case "https":
AddStsHeader();
@joshka
joshka / plex.diff
Last active August 29, 2015 14:06
diff plexmediaserver 0.9.9.14.531-1 vs plexmediaserver-plexpass 0.9.9.16.555-1 aur package tarball
View plex.diff
diff -u plexmediaserver/.AURINFO plexmediaserver-plexpass/.AURINFO
--- plexmediaserver/.AURINFO 2014-08-04 23:25:13.000000000 +1000
+++ plexmediaserver-plexpass/.AURINFO 2014-08-17 04:13:21.000000000 +1000
@@ -1,24 +1,20 @@
-pkgbase = plexmediaserver
- pkgdesc = Plex Media Server for Linux
- pkgver = 0.9.9.14.531
+pkgbase = plexmediaserver-plexpass
+ pkgdesc = PlexPass Release of Plex Media Server for Linux
+ pkgver = 0.9.9.16.555
View WebApplication1.log
Build started 9/19/2014 4:46:37 AM.
Project "C:\a\src\WebApplication1\WebApplication1.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "C:\a\src\WebApplication1\WebApplication1.sln" (1) is building "C:\a\src\WebApplication1\WebApplication1\WebApplication1.csproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "obj\Debug\".
CoreCompile:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:C:\a\src\WebApplication1\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll /reference:C:\a\src\WebApplication1\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll /reference:C:\a\src\WebApplication1\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.SqlServer.dll /reference:C:\a\src\WebApplication1\packages\Microsoft.AspNet.Identity.Core.2.1.0\lib\net45\Microsoft.AspNet.Identity.Core.dll /reference:C
View webjobs.props
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
$(CopyAllFilesToSingleFolderForPackageDependsOn);
AddWebJobFilesToPublish;
</CopyAllFilesToSingleFolderForPackageDependsOn>
<DestinationType>AzureWebSite</DestinationType>
</PropertyGroup>
</Project>
View keybase.md

Keybase proof

I hereby claim:

  • I am joshka on github.
  • I am joshka (https://keybase.io/joshka) on keybase.
  • I have a public key whose fingerprint is 926D 6ACA 9B76 8E3C 470F F96E 77AB 325D 0F31 E2F1

To claim this, I am signing this object:

@joshka
joshka / .AURINFO
Last active August 29, 2015 14:06
plexmediaserver-plexpass archilinux package
View .AURINFO
pkgbase = plexmediaserver-plexpass
pkgdesc = PlexPass Release of Plex Media Server for Linux
pkgver = 0.9.10.1.585
pkgrel = 1
url = http://www.plexapp.com
install = plexmediaserver.install
arch = i686
arch = x86_64
license = closed
depends = rsync
@joshka
joshka / ExceptionalFibonacciCalculator.cs
Created August 2, 2014 05:17
Calculate Fibonacci by using parallel tasks and aggregate exceptions. I did it for the cookie.
View ExceptionalFibonacciCalculator.cs
using System;
using System.Threading.Tasks;
namespace Fib
{
class ExceptionalFibonacciCalculator
{
public int Calculate(uint n)
{
try
@joshka
joshka / Cell.cs
Created April 13, 2013 16:21
Game of life in C#
View Cell.cs
using System.Collections.Generic;
namespace GameOfLife1
{
struct Cell
{
public Cell(int x, int y) : this()
{
Y = y;
X = x;