Skip to content

Instantly share code, notes, and snippets.

View peterblazejewicz's full-sized avatar
:octocat:
@code #remote #ssh #raspberrypi

Piotr Błażejewicz (Peter Blazejewicz) peterblazejewicz

:octocat:
@code #remote #ssh #raspberrypi
View GitHub Profile
@peterblazejewicz
peterblazejewicz / PipeClient.cs
Created January 1, 2025 22:08
Named pipes communication snip
using Shared;
var pipeClient =
new NamedPipeClientStream(".", "testpipe",
PipeDirection.InOut, PipeOptions.None,
TokenImpersonationLevel.Impersonation);
Console.WriteLine("Connecting to server...\n");
pipeClient.Connect();
{"id":875826720,"keymap":[[{"col":0,"row":0,"val":41},{"col":1,"row":0,"val":190},{"col":2,"row":0,"val":189},{"col":3,"row":0,"val":32260},{"col":4,"row":0,"val":32261},{"col":5,"row":0,"val":30760},{"col":6,"row":0,"val":30759},{"col":7,"row":0,"val":172},{"col":8,"row":0,"val":174},{"col":9,"row":0,"val":171},{"col":10,"row":0,"val":168},{"col":11,"row":0,"val":170},{"col":12,"row":0,"val":169},{"col":13,"row":0,"val":32264},{"col":14,"row":0,"val":76},{"col":15,"row":0,"val":0},{"col":0,"row":1,"val":41},{"col":1,"row":1,"val":30},{"col":2,"row":1,"val":31},{"col":3,"row":1,"val":32},{"col":4,"row":1,"val":33},{"col":5,"row":1,"val":34},{"col":6,"row":1,"val":35},{"col":7,"row":1,"val":36},{"col":8,"row":1,"val":37},{"col":9,"row":1,"val":38},{"col":10,"row":1,"val":39},{"col":11,"row":1,"val":45},{"col":12,"row":1,"val":46},{"col":13,"row":1,"val":49},{"col":14,"row":1,"val":53},{"col":15,"row":1,"val":0},{"col":0,"row":2,"val":43},{"col":1,"row":2,"val":20},{"col":2,"row":2,"val":26},{"col":3,"row":2,"v
@peterblazejewicz
peterblazejewicz / README.md
Last active August 6, 2024 07:21
Hackathon: essentials

Code, deploy and profit (do not panick)

Participating

2 teams, arrange your desks at will...

Resources

Tips & Tricks

@peterblazejewicz
peterblazejewicz / README.md
Last active June 4, 2024 09:38
Chat with other developer about code and life
@peterblazejewicz
peterblazejewicz / Dockerfile
Last active June 4, 2024 11:58
Squid todo (configure passwords and run on Windows through Docker with Lixux containers) and call example.com through proxy using curl (or similar)
FROM alpine:3.20
RUN apk -U add --no-cache squid
COPY squid.conf /etc/squid/squid.conf
COPY passwords /etc/squid/passwords
EXPOSE 3128/tcp
ENTRYPOINT ["squid", "-N", "-d1"]
@peterblazejewicz
peterblazejewicz / README.md
Created April 11, 2024 20:38 — forked from avoidik/README.md
Build Squid on Raspberry Pi with enabled SSL, SARG, SquidClamAV

Build Squid on Raspberry Pi with enabled SSL, optionally realtime SARG statistics and SquidClamAV

This is the short guide about how to recompile/enable --enable-ssl option in a Squid caching proxy server. The --enable-ssl option turned off by default, to be able to use SslBump feature we have to turn it on. To my own surprise Squid was compiled not only without --enable-ssl flag, but also with GnuTLS due to GPL legal reasons.

Optionally enable:

Squid

@peterblazejewicz
peterblazejewicz / README.md
Last active May 16, 2024 11:56
How to enable logging in Dante server

Modify Dante configuration file to enable logging, here for errors and debug:

errorlog: /var/log/sockd.errlog
logoutput: /var/log/sockd.log

In case you are receiving errors after configuring log sinks for danted service, like:

alert: configparsing(): could not (re)open logfile "/var/log/socks.log": Read-only file system
@peterblazejewicz
peterblazejewicz / input.scss
Last active May 21, 2023 16:22
Generated by SassMeister.com.
$primary: #334455;
.card {
color: white;
padding: 2rem;
--primary-color: $primary;
}
.card {
@peterblazejewicz
peterblazejewicz / input.scss
Created May 21, 2023 16:14
Generated by SassMeister.com.
$primary: #334455;
.card {
--primary-color: $primary;
}
.card {
--primary-color: #{$primary};
}
@peterblazejewicz
peterblazejewicz / launch.json
Created October 21, 2022 06:27
Angular VSCode integration
{
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "msedge",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},