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 / 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 April 15, 2024 09:48
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/"
},
interface ApiData {
'maps:longitude': string;
'maps:latitude': string;
}
type RemoveMapsFromData<T> = {
[K in keyof T as RemoveMaps<K>]: T[K];
};
type ExpectedApiData = RemoveMapsFromData<ApiData>;
@peterblazejewicz
peterblazejewicz / gist:31433e01b4bb39c33ee0a10b45ec0677
Created June 21, 2022 19:17
🎉 Congratulations! You are eligible to use GitHub Copilot for free.
🎉 Congratulations! You are eligible to use GitHub Copilot for free.
type DeepPartial<Thing> = Thing extends Function
? Thing
: Thing extends Array<infer InferredArrayMembmer>
? Array<DeepPartial<Thing>>
: Thing extends object
? DeepPartialObject<Thing>
: Thing | undefined;
type DeepPartialObject<Thing> = {
[Key in keyof Thing]?: DeepPartial<Thing[Key]>;
@peterblazejewicz
peterblazejewicz / branch-cleanup.ps1
Created March 31, 2022 06:54
git branch delete all but main powershell Win OS
git for-each-ref --format '%(refname:short)' refs/heads | ForEach-Object {If($_.StartsWith("main") -eq $false) { git branch -D $_ }}
@peterblazejewicz
peterblazejewicz / index.d.ts
Created February 14, 2022 17:32
Smooch sample
// Type definitions for smooch 5.3
// Project: https://github.com/zendesk/sunshine-conversations-web
// Definitions by: Jordan Sorensen <https://github.com/jpsorensen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Smooch {
/**
* Initializes the Smooch widget in the web page using the specified options. It returns a promise that will resolve when the Web Messenger is ready. Note that except on and off, all methods needs
* to be called after a successful init.
*/