Skip to content

Instantly share code, notes, and snippets.

@PyroGenesis
PyroGenesis / Instructions.md
Last active May 6, 2024 06:37
Instructions for dumping stack information of Winforms application using WER

Instructions

  1. Follow the instructions here to enable WER. Make sure the DumpType is set to 2 (Full Dumps).
  2. Make a new Module (static Class in C#) called ProgramEntryPoint.
  3. Copy the code written below and don't forget to change YOUR_STARTUP_FORM_NAME_HERE.
  4. Change project configuration to Debug
  5. Go to Project Properties. In the Application tab, uncheck "Enable application framework".
  6. Change Startup Object to Sub Main.
  7. Go to Debug -> Windows -> Exception Settings and make sure Common Language Runtime Exceptions is checked (full checked and not partially checked).
  8. Now whenever an unhandled exception occurs, your application will quit and a .dmp file will be created in the folder specified in the DumpFolder registry key.
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 6, 2024 06:36
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@noteeeeee
noteeeeee / JetBrainsActivation.md
Last active May 6, 2024 06:35
Webstorm/JetBrains products activation 2024 (Windows/MacOS)

Webstorm/JetBrains products activation 2024 (Windows/MacOS)

1.Proxy Settings

  1. Step 1: Navigate to Proxy settings.
  2. Step 2: Select "Manual proxy settings - HTTP".
    • Hostname: localhost
    • Port: 80

Set no proxy for:

@fnky
fnky / ANSI.md
Last active May 6, 2024 06:34
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@avseng
avseng / surveillance.py
Last active May 6, 2024 06:34
Raspberry Pi 4 surveillance system source code
import smtplib, email, os
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email import encoders
from picamera import PiCamera
from time import sleep
from datetime import datetime
import RPi.GPIO as GPIO
@DarioBF
DarioBF / whatever.sh
Created November 8, 2019 08:59
Disable MacOS animations (faster experience)
To disable:
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSScrollAnimationEnabled -bool false
defaults write -g NSWindowResizeTime -float 0.001
defaults write -g QLPanelAnimationDuration -float 0
defaults write -g NSScrollViewRubberbanding -bool false
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
@sw897
sw897 / TextSelectionReader.cs
Created May 13, 2016 01:28
Class that can be used to retrieve the currently selected text (if any) from an active control in the active window. It does this by trying several methods internally (UIAutomation, API calls using SendMessage + WM_GETTEXT, Clipboard). Be sure to reference UIAutomationClient and UIAutomationTypes!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Windows.Automation;
using System.Windows.Forms;
//WARNING: The code below is NOT for the faint of heart. Exceptions are swallowed freely, sendkeys
import torch
import torch.utils.dlpack
import jax
import jax.dlpack
# A generic mechanism for turning a JAX function into a PyTorch function.
def j2t(x_jax):
x_torch = torch.utils.dlpack.from_dlpack(jax.dlpack.to_dlpack(x_jax))
return x_torch
@IverCoder
IverCoder / office-guide.md
Last active May 6, 2024 06:34
Install and Activate Microsoft Office for Free - A Step-by-Step Guide

Please leave a star at the GitHub Gist mirror if this guide has helped you! You can also ask questions/assistance there.

Install and Activate Microsoft Office 365 for Free - A Step-by-Step Guide

This is a guide on how to install the latest version of Microsoft Office for free. For this method, we will use the Office Deployment Tool. The Microsoft Office Deployment Tool is a command-line program that IT managers use to configure and deliver Office products to PCs in their businesses, but in this guide, we will use it to install Microsoft Office with additional customization options and download it straight from Microsoft's servers.

NOTE: You will not need to repeat this step again to upgrade. Just keep your Office up to date and you will not have any issues.

NOTE: Make sure you have recently reloaded your number with at least 5GB of internet if you use your mobile internet through a hotspot to download. If your telecom

@Sherex
Sherex / README.md
Last active May 6, 2024 06:26
A script for the Wireguard config options PostUp/PostDown entries. It will allow peers to connect to the Wireguard interface and do IP forwarding (port forwarding will be added later)

IfScript

Hi, I made this for my use-case, but feel free to use it :)
This is currently only handling the NAT side of things, not PAT!
The from-to port options is just a placeholder it will use the first port specified.

route_port 80 80 tcp $vpn_ip $server_ip

How to use?

Download and make executable