Skip to content

Instantly share code, notes, and snippets.

View meain's full-sized avatar

Abin Simon meain

View GitHub Profile
@jdtsmith
jdtsmith / eglot-booster.el
Last active February 16, 2024 18:17
eglot-booster: boost eglot with emacs-lsp-booster. ****NOTE: USE THIS PACKAGE INSTEAD: https://github.com/jdtsmith/eglot-booster
;;; eglot-booster.el --- boost eglot using emacs-lsp-booster -*- lexical-binding: t; -*-
;; Copyright (C) 2024 J.D. Smith
;;; Commentary:
;; **UPDATE** This has been superseded by the following package:
;; https://github.com/jdtsmith/eglot-booster
;;
;; Boost eglot with emacs-lsp-booster.
;; 1. Download a recent emacs-lsp-booster from
@luruke
luruke / bunny.js
Created October 27, 2018 07:51
draw bunny on terminal
const drawille = require('drawille')
const bunny = require('bunny')
const glmatrix = require('gl-matrix')
const width = 200
const height = 200
const canvas = new drawille(width, height)
const mat4 = glmatrix.mat4
const vec3 = glmatrix.vec3
let points = []
@hopsoft
hopsoft / prefetch.js
Last active December 27, 2023 02:45
Turbolinks Prefetching
const hoverTime = 400
const fetchers = {}
const doc = document.implementation.createHTMLDocument('prefetch')
function fetchPage (url, success) {
const xhr = new XMLHttpRequest()
xhr.open('GET', url)
xhr.setRequestHeader('VND.PREFETCH', 'true')
xhr.setRequestHeader('Accept', 'text/html')
xhr.onreadystatechange = () => {
@hew
hew / _readme.md
Last active June 10, 2022 19:13
Operator Mono w/ Italics on OSX VIm

Operator Mono w/ Italics on OSX Vim

# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@RickCogley
RickCogley / curl-to-matrix-text-readme.md
Last active February 25, 2024 01:45
Testing curl to matrix.org

Testing the matrix.org client-server API

Matrix is:

an open standard for decentralised communication, providing simple HTTP APIs and open source reference implementations for securely distributing and persisting JSON over an open federation of servers.

It's pretty fantastic, if you think on the massive problem of fragmentation all across the web. They've created an easy to use API, and you can do a kludgy test using curl from the terminal (*nix, mac, win). See: http://matrix.org/docs/howtos/client-server.html

It's pretty straightforward to do a quick test. I have an account at https://matrix.org / https://vector.im, so I used that to get a token.

@martijnvermaat
martijnvermaat / nixos.md
Last active May 9, 2024 01:11
Installation of NixOS with encrypted root
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@alojzije
alojzije / connectHTMLelements_SVG.png
Last active May 13, 2024 08:16
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png