Skip to content

Instantly share code, notes, and snippets.

View mkp7's full-sized avatar
🎯
focusing

Mehulkumar mkp7

🎯
focusing
  • Bangalore, IN
View GitHub Profile
@AkshayGuptaK
AkshayGuptaK / list.js
Created August 9, 2020 13:42
List Monad in JS
function List(lst) {
return {
of: lst,
fmap: (fn) => List(lst.map(fn)),
join: () => List(lst.reduce((acc, l) => acc.concat(l), [])),
bind: function (fn) {
return this.fmap(fn).join();
},
};
}
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active October 21, 2025 06:41
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
@niranjv
niranjv / install_python_36_amazon_linux.sh
Last active January 30, 2023 21:49
Install Python 3.6 in Amazon Linux
# A virtualenv running Python3.6 on Amazon Linux/EC2 (approximately) simulates the Python 3.6 Docker container used by Lambda
# and can be used for developing/testing Python 3.6 Lambda functions
# This script installs Python 3.6 on an EC2 instance running Amazon Linux and creates a virtualenv running this version of Python
# This is required because Amazon Linux does not come with Python 3.6 pre-installed
# and several packages available in Amazon Linux are not available in the Lambda Python 3.6 runtime
# The script has been tested successfully on a t2.micro EC2 instance (Root device type: ebs; Virtualization type: hvm)
# running Amazon Linux AMI 2017.03.0 (HVM), SSD Volume Type - ami-c58c1dd3
# and was developed with the help of AWS Support
@mondain
mondain / public-stun-list.txt
Last active October 24, 2025 10:43
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 28, 2025 12:54
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@alexandrevicenzi
alexandrevicenzi / index.html
Last active September 25, 2024 00:16
Bootstrap CSS Animate Loading Icon Button
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>

ACTIVE AUTHENTICATION @ DARPA // Andrew Monks

Project description

Goals

DARPA first announced Active Authentication in 2011. The project seeks to replace password-based authentication with what I might have intuitively called a more active model: rather than requiring the user to take a specific login action (which can be discretely spoofed), a device should continually gather data based on usage patterns (typing speed, mouse movement, …) and then compare that data to the known patterns of an authorized user. As the system gains confidence that its user is authorized, it will gradually (but over a very short duration of perceived human time) remove access restrictions. If the system detects an unauthorized user, it'll shut down and call security (or follow whatever other procedure, as specified).

Timeline

@planetoftheweb
planetoftheweb / MagicWrapUL_LI_IMG_emmet.html
Created February 11, 2014 20:06
Emmet shortcut to quickly create a list of images linked to high-res versions. Watch a video at http://youtube.com/planetoftheweb
ul>li*>a[href="images/$#.jpg"]>img[src="images/$#_tn.jpg" alt="Photo of $#"]
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net