Skip to content

Instantly share code, notes, and snippets.

View azhe403's full-sized avatar
😐
On Error Resume Next

Azhe Kun azhe403

😐
On Error Resume Next
View GitHub Profile
@fakhrulhilal
fakhrulhilal / dotnet-nodejs.Dockerfile
Created January 16, 2023 08:30
Docker image for .NET with nodejs
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENV ASPNETCORE_URLS "https://+,http://+"
ENV ASPNETCORE_HTTPS_PORT 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ENV NODE_VERSION 18.x
@mcxiaoke
mcxiaoke / miui-blotware-apps.md
Last active April 24, 2024 11:33
MIUI 13/14 bloatware apps, updated at 20240816

对于所有应用,不建议直接删除,使用adb shell pm disable-user package-name禁用即可,方便出问题时恢复。

DO NOT UNINSTALL:

  • com.miui.securitycenter
  • com.miui.securityadd
  • com.xiaomi.finddevice

(Don’t uninstall these three apps or services from your Xiaomi device. Otherwise, you may encounter device bricking or bootloop issues.)

using System;
using System.Linq;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
namespace AutoInject
{
public enum InjectType
{
Singleton,
/*
1) Open https://popcat.click
2) Open console (F12)
3) Insert code & run
*/
var event = new KeyboardEvent('keydown', {
key: 'g',
ctrlKey: true
@ppoffice
ppoffice / README.md
Last active April 21, 2024 01:33
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@lauw
lauw / Business.cs
Last active April 3, 2022 10:39
ReboDb mapping helper to support different casing and default Table/Column attributes
using System.ComponentModel.DataAnnotations.Schema;
namespace UserApi
{
[Table("businesses")]
public class Business
{
[Column("id")]
@litetex
litetex / Description.md
Last active March 2, 2024 03:12
Serilog (C#): How to get current MethodName, FileName/Path and LineNumber without reflection

Serilog (C#): How to get the current MethodName, FileName/Path and LineNumber without reflection

This is a simple setup for reflectionless logging with serilog using caller information (and a single static class).

See also https://stackoverflow.com/a/46905798

Log.cs

Create your own Log.cs in your Root-Namespace (you can use the class below).

This class is required to detect where the call is coming from; it uses Caller-Information to speed up the program execution, because the attributes are resolved at compile-time.

@abdilahrf
abdilahrf / hosts
Last active October 5, 2023 05:19
Blokir hostname INDIHOM* ke localhost kita biar kapok, untuk linux tambahin di file /etc/hosts & windows /System32/drivers/etc/hosts
# INDIHOM*
127.0.0.1 x-tags.net
127.0.0.1 a01.uadexchange.com
127.0.0.1 cdn.uzone.id
127.0.0.1 cdn3.uzone.id
127.0.0.1 cfs.uzone.id
127.0.0.1 csf.uzone.id
127.0.0.1 d01.notifa.info
127.0.0.1 d31qbv1cthcecs.cloudfront.net
127.0.0.1 d5nxst8fruw4z.cloudfront.net
@greeflas
greeflas / install-toolbox.sh
Last active March 29, 2024 07:53
JetBrains Toolbox installation script for Ubuntu - https://www.jetbrains.com/toolbox/app/
#!/bin/bash
set -e
if [ -d ~/.local/share/JetBrains/Toolbox ]; then
echo "JetBrains Toolbox is already installed!"
exit 0
fi
echo "Start installation..."
@chuv1
chuv1 / tgEntitiesToHTML.php
Last active November 18, 2023 09:37
Test function to convert telegram message entities into HTML markup.
public function getHTML($without_cmd = false){
if(empty($this->getEntities())){
return $this->getText($without_cmd);
}
$text = $this->getText();
$html = '';
$entities_count = \count($this->getEntities())-1;