Skip to content

Instantly share code, notes, and snippets.

View mihai-vlc's full-sized avatar

Mihai Ionut Vilcu mihai-vlc

View GitHub Profile
(function() {
// restore the native console object
var i = document.createElement('iframe');
i.style.display = 'none';
document.body.appendChild(i);
window.console = i.contentWindow.console;
var script = document.createElement("script");
script.src = "https://unpkg.com/axe-core@4.4.3/axe.min.js";
script.onload = function () {
# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-3-1.html
MainWindowBackground = #555555
EscToExit = false
ReuseInstance = true
UseSysColors = false
RestoreSession = true
TabWidth = 350
FixedPageUI [
@mihai-vlc
mihai-vlc / README.md
Created July 10, 2022 11:23
Attempt to reload dll in a golang program

I found that when we attempt to use the DLL generated by GO we get the following error:

fatal error: bad sweepgen in refill

runtime stack:
runtime.throw({0x807f8e?, 0xc0000c3df8?})
        C:/Program Files/Go/src/runtime/panic.go:992 +0x76
runtime.(*mcache).refill(0x271caaf0a28, 0x2)
        C:/Program Files/Go/src/runtime/mcache.go:156 +0x1ec
@mihai-vlc
mihai-vlc / outputUtils.js
Created January 23, 2022 11:39
Utilities for small scripts triggered from system tray or app launchers.
import path from 'node:path';
import { exec } from 'child_process';
import os from 'os';
import fs from 'fs';
/**
* Create a temporary file and opens it in vscode with the provided content.
*
* @param {String} text The content of the file.
* @param {String} extension The file extension (useful for syntax highlight)
# Define files and directories to delete
$include = @("*.suo","*.user","*.cache","*.docstates","bin","obj","build", "Debug", ".vs")
# Define files and directories to exclude
$exclude = @()
$items = Get-ChildItem . -recurse -force -include $include -exclude $exclude
if ($items) {
foreach ($item in $items) {
@mihai-vlc
mihai-vlc / Keypirinha.ini
Created August 8, 2021 13:08
Keypirinha configuration
[app]
launch_at_startup = yes
hotkey_run = Alt+Space
[gui]
theme = MediumLayout
# Solves the problem discussed as part of the following video: https://www.youtube.com/watch?v=3Q_oYDQ2whs
#
# Author: Mihai Ionut Vilcu <ionutvmi@gmail.com>
# Jan 2020
#
def getMinutesValue(time):
hours, minutes = time.split(':')
return int(hours) * 60 + int(minutes)
(function () {
var fileNameRegex = /<a href="((.*?)FILENAME(.*?))"/g;
var fileContentRegex = /MyString/g;
fetch('MyURL')
.then(function(response) {
return response.text();
})
.then(function(text) {
;
;
; Commit message build
; A small GUI tool for build commit messages with the proper format.
;
; Author: Mihai Ionut Vilcu <ionutvmi@gmail.com>
; Date: Oct 2018
;
; How to use:
; 1. Intall https://autohotkey.com
@mihai-vlc
mihai-vlc / .bashrc
Last active September 2, 2018 10:31
Dotfiles
# Show the user, computer, folder and date in the prompt
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] [\D{%F %T}]\nλ '
alias ls='ls --color=never'