Skip to content

Instantly share code, notes, and snippets.

View mtungusov's full-sized avatar

Mikhail Tungusov mtungusov

  • Serbia, Belgrade
View GitHub Profile
@rougier
rougier / nano.el
Created February 4, 2025 18:48
NANO Emacs (minimal version: 256 lines)
;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*-
;; Copyright (c) 2025 Nicolas P. Rougier
;; Released under the GNU General Public License 3.0
;; Author: Nicolas P. Rougier <nicolas.rougier@inria.fr>
;; URL: https://github.com/rougier/nano-emacs
;; This is NANO Emacs in 256 lines, without any dependency
;; Usage (command line): emacs -Q -l nano.el -[light|dark]
@jetfir3
jetfir3 / download_fusion.sh
Last active November 13, 2025 15:34
Download VMware Fusion Pro Without a Broadcom Account
#!/usr/bin/env bash
# Download VMware Fusion for macOS without a Broadcom account.
#
# This script allows you to download various versions of VMware Fusion
# from Broadcom's Cloudflare CDN (versions 8.0.0 to 13.6.3)
# or from the archive.org VMware Workstation archive (versions 8.x.x+).
#
# Options:
# -k: Keep the downloaded file compressed (Cloudflare only; ignored for archive.org).
@habamax
habamax / emacs-python-treesitter-eglot.org
Last active May 14, 2025 08:47
Setup Emacs for Python with Treesitter and Eglot

Emacs, Python, Treesitter and Eglot

Treesitter (“better”/faster syntax highlighting)

  1. Make sure you have Emacs with treesitter support:

    M-: (treesit-available-p) RET should return t

  2. Make sure you have installed python treesitter grammar
@DannyQuah
DannyQuah / 2022.01-D.Quah-Obsidian-iPad-syncing-via-iSH-git.md
Last active September 9, 2025 16:10
Obsidian on iPad syncing via iSH, git, and GitHub

Obsidian iPad syncing via iSH git

by Danny Quah, Jan 2022

This gist describes using Obsidian on iPad while syncing to other Obsidian platforms. The procedure uses git in iSH on iOS, and thus differs from using either Obsidian Sync or Working Copy as described in Obsidian/iOS+app.

(To be clear, Obsidian is one of my favourite Apps, and I'm all for supporting the team financially. Moreover, everything I've heard suggests the paid Obsidian Sync is excellent. However, I don't want my syncing processes to proliferate --- each service using a different client sync flow --- so I keep my systems minimal: just syncthing and git. After writing this I found an Obsidian Forum writeup which uses the same tools I do to achieve the same goal, but you'll want to read that with its accumulated contributions dispersed across the comments. So at least I was thinking

@vncsna
vncsna / bash_strict_mode.md
Created June 6, 2021 01:59 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@c0psrul3
c0psrul3 / Corne.crkbd_c0psrul3.default.json
Last active February 3, 2025 05:46
Corne keyboard layout
[
{
"name": "Corne, default layer",
"author": "https://github.com/c0psrul3",
"plate": false,
"keyboard-layout-editor": "http://www.keyboard-layout-editor.com/#/gists/adfa7c3cd8f0c6d3a7b9155c6eab1748#file-corne-crkbd_c0psrul3-default-json",
"qmk-config": "https://config.qmk.fm/#/crkbd/rev1/LAYOUT"
},
[
{
@githubfoam
githubfoam / pentest cheat sheet
Last active November 18, 2025 20:02
pentest cheat sheet
----------------------------------------------------------------------------------------------------
OWASP Top Ten
https://owasp.org/www-project-top-ten/
The CWE Top 25
https://www.sans.org/top25-software-errors/
2022 CWE Top 25 Most Dangerous Software Weaknesses
https://cwe.mitre.org/top25/archive/2022/2022_cwe_top25.html
@isokolovskii
isokolovskii / Ubuntu safe old kernel remove
Last active May 26, 2020 12:19
Safe remove of old ubuntu kernels to clean up /boot
$ sudo rm -rv ${TMPDIR:-/var/tmp}/mkinitramfs-*
## In Ubuntu 16.04 and earlier there may be leftover temporary
## files to delete.
## See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814345
$ uname -r ## This command identifies the currently-running kernel
4.2.0-21-generic ## This is the current kernel.
## DO NOT REMOVE it!
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(dedupe)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)
@direvius
direvius / gen_ammo.rb
Created October 13, 2012 20:53
Generate ammo for Yandex.tank
#!/usr/bin/env ruby
# simple GET ammo generation, pass hostname as a first parameter and uris to STDIN
STDIN.each{|line|
request = <<-EOS
GET #{line.chomp} HTTP/1.0\r
Host: #{ARGV[0]}\r
Accept: */*\r
User-Agent: tank\r
Connection: close\r