Skip to content

Instantly share code, notes, and snippets.

@jpassaro
jpassaro / 00-unicode-cheat-sheet.md
Last active May 5, 2024 14:44
Unicode cheat sheet

Unicode cheat sheet

A curated list of unicode characters I want to have quick reference toward, including their literal presentation (where possible), description from the unicode table, various representations, and how to enter it as a Vim digraph*.

They are grouped by category, including a link to the relevant Unicode block. Also see the full list of Unicode blocks

@x011
x011 / imacros-cheatsheet.md
Created October 7, 2016 12:07
iMacros Command, Variable, and function reference
@novemberborn
novemberborn / setup.md
Created January 7, 2016 15:05
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

{
"Barisal": ["Barguna", "Barisal", "Bhola", "Jhalokati", "Patuakhali", "Pirojpur"],
"Chittagong":["Bandarban","Brahmanbaria", "Chandpur", "Chittagong", "Comilla", "Cox's Bazar","Feni", "Khagrachhari","Lakshmipur", "Noakhali", "Rangamati"],
"Dhaka": ["Dhaka", "Faridpur", "Gazipur", "Gopalganj", "Kishoreganj","Madaripur", "Manikganj","Munshiganj", "Narayanganj","Narsingdi","Rajbari","Shariatpur","Tangail"],
"Khulna": ["Bagerhat", "Chuadanga", "Jessore", "Jhenaidah", "Khulna", "Kushtia", "Magura", "Meherpur", "Narail", "Satkhira"],
"Mymensingh":["Jamalpur", "Mymensingh", "Netrakona","Sherpur"],
"Rajshahi" :["Bogra", "Chapainawabganj","Joypurhat","Naogaon", "Natore", "Pabna", "Rajshahi", "Sirajganj"],
"Rangpur" :["Dinajpur", "Gaibandha", "Kurigram", "Lalmonirhat","Nilphamari", "Panchagarh", "Rangpur", "Thakurgaon"],
"Sylhet" :["Habiganj", "Moulvibazar", "Sunamganj","Sylhet"]
}
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active May 5, 2024 14:39
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@mara004
mara004 / pypdfjs.py
Last active May 5, 2024 14:39
PDF rendering with pdf.js, from Python
# SPDX-FileCopyrightText: 2023 mara004
# SPDX-License-Identifier: CC-BY-4.0 OR Apache-2.0
# See also https://github.com/extremeheat/JSPyBridge/blob/master/examples/python/pdfjs.py
# Py-Depends: pillow, javascript >= 1.1.0 (jspybridge)
# Js-Depends: pdfjs-dist, canvas
# Use `python -m pip install` and `python -m javascript --install`
import argparse
@davidsteppenbeck
davidsteppenbeck / KeyframeView.swift
Created May 3, 2024 20:08
Keyframe Animation Example in SwiftUI
import SwiftUI
struct KeyframeValues {
var scale = 1.0
var horizontalStretch = 1.0
var verticalStretch = 1.0
var translation = 0.0
var rotation = Angle.zero
}
@ezracb
ezracb / VMware Workstation Pro and Fusion Pro Licence Keys
Created April 9, 2021 14:43
VMware Workstation Pro and Fusion Pro Licence Keys
Obviously using these keys may be a grey area. I use them for my computer, but there are no guarentees VMware won't sue you if you use them in a commercial environment.
VMware Workstation 16
YF390-0HF8P-M81RQ-2DXQE-M2UT6
VMware Fusion Pro 12
YF390-0HF8P-M81RQ-2DXQE-M2UT6
As far as I know, this key works on both Fusion and Workstation.
@ityonemo
ityonemo / test.md
Last active May 5, 2024 14:36
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@mycodeschool
mycodeschool / Stack_ArrayImplementation_OOP.cpp
Created October 8, 2013 02:44
An object oriented implementation of stack using arrays in C++.
// Stack - Object oriented implementation using arrays
#include <iostream>
using namespace std;
#define MAX_SIZE 101
class Stack
{
private:
int A[MAX_SIZE]; // array to store the stack
int top; // variable to mark the top index of stack.