Skip to content

Instantly share code, notes, and snippets.

@Paraphraser
Paraphraser / RPiWiFiFreeze.md
Last active March 27, 2024 03:41
Do your Raspberry Pi's Network Interfaces freeze? This may solve it.

Do your Raspberry Pi's Network Interfaces freeze?

My Raspberry Pi 4 kept losing its wlan0 interface. I could usually reconnect via Ethernet but, from time to time, I noticed that the eth0 interface would also go walkabout.

I tried a lot of things but the one described here seems to have cured the problem. I have no idea why it works. It just does.

Step 0 - are you a Windows user?

The script shown in the next step should be created on your Raspberry Pi. Please do not make the mistake of selecting the text, copying it into a text editor on your Windows machine, saving the file, and then moving the file to your Raspberry Pi. Unless you take precautions, Windows will add its 0x0d 0x0a (CR+LF) line endings and those will stop the script from working properly on your Raspberry Pi.

@escamoteur
escamoteur / nextField.dart
Created September 13, 2019 12:22
So easy is it now to implement a next field behavior for forms, meaning that the focus is moved as soon the user tabs the next button on the keyboard
class _MyHomePageState extends State<MyHomePage>
with SingleTickerProviderStateMixin {
TabController _tabController;
FocusScopeNode _node = FocusScopeNode(); /// <-----------------
@override
void initState() {
_tabController = TabController(length: 3, vsync: this);
@proteye
proteye / rsa_pem.dart
Last active March 19, 2024 08:59
How to encode/decode RSA private/public keys to PEM format in Dart with asn1lib and pointycastle
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';
import "package:pointycastle/export.dart";
import "package:asn1lib/asn1lib.dart";
List<int> decodePEM(String pem) {
var startsWith = [
"-----BEGIN PUBLIC KEY-----",
"-----BEGIN PRIVATE KEY-----",
@hellos3b
hellos3b / PrivacyPolicy.md
Last active August 16, 2019 19:48
Jot! Notes Widget Privacy Policy

Privacy Policy

Jot! Notes Widget by hellos3b

hellos3b built the Jot! Notes Widget app as a Free app. This SERVICE is provided by hellos3b at no cost and is intended for use as is.

No data that you enter into Jot! Notes Widget is shared anywhere. The notes you enter into the app are only ever stored on your device

We do not use any third party software to collect data on usage. We do collect anonymous crash reports from Google as is provided by the Play Store Service.

@ericdagenais
ericdagenais / pgadmin2datagrip.rb
Last active January 26, 2022 21:00
Windows: Import PgAdmin 3 Connections to Navicat and DataGrip
require 'win32/registry'
passwords = Hash.new
file = nil
begin
file = File.new("#{ENV['APPDATA']}\\postgresql\\pgpass.conf", "r")
while (line = file.gets)
c = line.split(':')
key = "#{c[0]}:#{c[1]}:#{c[2]}:#{c[3]}"
passwords[key] = c[4].strip if c.length > 4
@valep27
valep27 / RSAKeys.cs
Created December 13, 2017 09:44 — forked from therightstuff/RSAKeys.cs
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{
@ilnuribat
ilnuribat / DatePicker.qml
Last active April 12, 2024 14:04
Pure QML DatePicker, like android material design datePicker. QtQuick 2.7, QtQuick.Controls 2.0, Qt.labs.calendar 1.0. PS: dimensions in millimeters, so no depends on screen pixel density.
import QtQuick 2.7
import QtQuick.Window 2.2
import QtQuick.Controls 2.0
import Qt.labs.calendar 1.0
Rectangle {
id: mainForm
height: cellSize * 12
width: cellSize * 8
property double mm: Screen.pixelDensity
@nnja
nnja / how-to-rebase.md
Created May 26, 2016 20:24
How to Rebase

When many different people are working on a project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the main line of development, and it needs to be updated before it can be merged into the project. The most common reason why pull requests go stale is due to conflicts: if two pull requests both modify similar lines in the same file, and one pull request gets merged, the unmerged pull request will now have a conflict. Sometimes, a pull request can go stale without conflicts: perhaps changes in a different file in the codebase require corresponding changes in your pull request to conform to the new architecture, or perhaps the branch was created when someone had accidentally merged failing unit tests to the master branch. Regardless of the reason, if your pull request has gone stale, you will need to rebase your branch onto the latest version of the master branch before it can be merged.

What is a rebase?

@Rottweiler
Rottweiler / gist:44fe4461a4552acf303a
Last active January 18, 2023 10:49
Heavily obfuscated UnConfuserEx tool
UnConfuserEx https://mega.nz/#!U1hxwQKb!7WFBSjrZgg8ieFp15K0RJW8rWuyMHZTO9bpCekhBQfY
ConfuserExDupPopPatcher https://mega.nz/#!IkhHzZDS!vPYABdYJtuDIGJBHdKzwIqLajxugJaNlENWr5CWjNlo
ConfuserExStringDecryptor https://mega.nz/#!plhxRJyY!Vq9eRS-gixC__q75860gDD8Tcm_ncOfCCCP_HQKguUM
ConfuserExCallFixer https://mega.nz/#!0gZFlbwC!KFka_Kxe-GuU-d8COni91xmGPbiRnbX6lBLYAomn7No
I'm not responsible for what you do with these -- they may very well be backdoored
@neilco
neilco / RSASHA1.swift
Created April 27, 2015 09:07
RSA-SHA1 signing with a PKCS#12 private key
//
// RSASHA1.swift
//
// Copyright (c) 2015 Neil Cowburn. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is