Skip to content

Instantly share code, notes, and snippets.

@Balder1840
Balder1840 / README.md
Created August 21, 2024 09:32 — forked from ullaskunder3/README.md
Detail flutter installation without android studio just using cmdline-tools, git, cmd
@Balder1840
Balder1840 / wsl2_love_openwrt.md
Last active March 19, 2025 03:03
Run OpenWrt as a custom distro in WSL2 (WSL2下直接运行openwrt)

Here is an instruction to start openwrt as a custom WSL2 distro.
I didn't start it as a gateway in my local because I don't have windows 11 installed, and you know the poor network mode in windows 10 and wsl2.

Found a way to set WSL's network mode to bridged here and have successfully configured it as a gateway in my local.

But anyway, I think it should work under windows 11 and wsl2, since you can config it as bridged mode.
Have fun!

1. Prerequisites

1.1. Import openwrt's rootfs.tar.gz as a custom WSL2 distro

you can download from the official site

@Balder1840
Balder1840 / .NET6Migration.md
Created September 9, 2022 02:51 — forked from davidfowl/.NET6Migration.md
.NET 6 ASP.NET Core Migration
@Balder1840
Balder1840 / config.rb
Last active May 27, 2022 05:49
Gollum with authentication and NiceTOC, as well as a collapsed sidebar
# To register this macro into your Gollum wiki, I recommend adding it to your
# existing `--config` file. If you don't have a configuration, you can create a
# new one at the root of your wiki and then start Gollum with:
#
# --config your-config-file.rb
#
# This macro provides a list of links to all of the pages in your wiki (except
# for the current page). It can handle any amount of nested subdirectories.
module Gollum
class Macro
@Balder1840
Balder1840 / README.md
Created February 25, 2022 05:33 — forked from rca/README.md
An explanation of `git rebase --onto`

git rebase onto fu

Looking at the following git history, there are a few commits that were accidentally made on top of env/dev-auth that should be on a feature branch named experiments/sso-login-app (1. in the command below):

[0][~/Projects/openslate/thing(env/dev-auth:feb0ee9)]
$ git log
commit feb0ee98c8b77e929b9cc23442c5664c9d4986c9 (HEAD -> env/dev-auth)  # this is `0.` in the command below
Author: Roberto Aguilar <[email protected]>
Date:   Thu Sep 26 00:25:15 2019 -0400
@Balder1840
Balder1840 / Microsoft.PowerShell_profile.ps1
Last active April 19, 2025 11:59
beautify windows terminal with powershell & cmder
# https://ohmyposh.dev/docs/faq
[Console]::OutputEncoding = [Text.Encoding]::UTF8
#$ExecutionContext.SessionState.LanguageMode = "FullLanguage"
#$ExecutionContext.SessionState.LanguageMode
$env:POSH_CONSTRAINED_LANGUAGE = 1
Import-Module PSReadLine
Import-Module posh-git
Import-Module oh-my-posh
@Balder1840
Balder1840 / huawei_e8372_config.md
Created June 23, 2021 09:01 — forked from aayubkh/huawei_e8372_config.md
Huawei E8372 Linux Configuration and Setup

Dependencies

  1. usb_modeswitch, usb_modeswitch-data
  2. libusb1
  3. libusb-devel(Fedora), libusb-dev(Debian based)

Configuration

By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at 2 values. Give the following command (while the dongle is plugged in):

    sudo su
    lsusb | grep Huawei
@Balder1840
Balder1840 / docker-cleanup-resources.md
Created June 18, 2019 16:54 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@Balder1840
Balder1840 / CssRewriteUrlTransformFixed.cs
Created April 21, 2019 08:38
CssRewriteUrlTransform for mvc bundle with virtual path when deployed in IIS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;
namespace XXX.Web
{
public class CssRewriteUrlTransformFixed : IItemTransform
{
public class WhereBuilder
{
private readonly IProvider _provider;
private TableDefinition _tableDef;
public WhereBuilder(IProvider provider)
{
_provider = provider;
}