Skip to content

Instantly share code, notes, and snippets.

View mohkale's full-sized avatar
😎

Mohsin Kaleem mohkale

😎
View GitHub Profile
@mohkale
mohkale / all-the-icons-nonicons.el
Created September 28, 2021 16:02
See domtronn/all-the-icons#285
(require 'all-the-icons)
(defvar all-the-icons-data/nonicon-alist
'(("alert" . "")
("angular" . "")
("archive" . "")
("arrow-both" . "")
("arrow-down" . "")
("arrow-left" . "")
("arrow-right" . "")
@mohkale
mohkale / fix-wide-glyph-truncation.diff
Created August 19, 2021 22:45
st: Fix wide glyph truncation (courtesy of @Dreomite)
diff --git a/st.h b/st.h
index fa2eddf..73debe6 100644
--- a/st.h
+++ b/st.h
@@ -36,6 +36,12 @@ enum glyph_attribute {
ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
};
+enum drawing_mode {
+ DRAW_NONE = 0,
;; an-old-hope-theme.el -- a syntax theme from a galaxy far away... -*- lexical-binding: t -*-"
;; Author: Mohsin Kaleem
;; URL: https://github.com/MoHKale/an-old-hope-theme
;; Version: 0.1.0
;; Keywords: color, theme
;; Package-Requires: ((emacs "24"))
;; This file is not part of GNU Emacs
;; This file is free software; you can redistribute it and/or modify
@mohkale
mohkale / fib.rb
Last active June 27, 2020 14:31
memoized fibonacci
class Fib
def fib(i)
memory.fetch(i) do
val = if i <= 1
[i,0].max
else
fib(i-1) + fib(i-2)
end
memory[i] = val
end
@mohkale
mohkale / move_square.py
Created April 23, 2020 16:10
turtlebot3 move square script
#!/usr/bin/env python
import enum
import rospy
import math
import functools
import sys
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Twist
from tf.transformations import euler_from_quaternion as efq
@mohkale
mohkale / arch
Last active September 19, 2020 23:09
My Arch Linux Install Script
#!/usr/bin/env bash
# installation config
name=mohkale
export user=mohkale
version=0.0.2
export dotfile_repo='https://github.com/mohkale/dotfiles'
default_hostname='arch'
# color setup
@mohkale
mohkale / rakefile
Created May 4, 2019 21:47
Simple C Project Rakefile
OBJ_DIRECTORY = "obj"
BIN_DIRECTORY = "bin"
COMPILER = 'g++'
FORMAT = "cpp"
source_files = FileList["*.#{FORMAT}"]
OUTPUT_FILE = File.join "./", BIN_DIRECTORY, "main.exe"
@mohkale
mohkale / task1.py
Last active February 9, 2021 06:21
My Attempts at Various Programming Interview Questions
# Interview: "https://www.youtube.com/watch?v=10WnvBk9sZc"
"""
Take two strings
Begin at index 0 on string one
Iterate over one of the strings until you find a character in both strings
Append it to subsequence and cut off remainder in other string
Error:
* Iterating over first string selects longest substring from first string