Skip to content

Instantly share code, notes, and snippets.

@fakuivan
fakuivan / create_sidepanel_folder.bat
Created March 7, 2020 15:57
Creates a side panel entry for windows explorer
@echo off
:: GUIDs were randomly generated using the command ``python3 -c "import uuid; print(str(uuid.uuid4()).upper())"``
set guid=C3AA96DB-679A-4D75-B53F-F9EBDFEBE6C3
set name=Seafile
set folder=%%userprofile%%\Seafile
set icon=%%programfiles(x86)%%\Seafile\bin\seafile-applet.exe,-2
:: set guid=92EB2F95-3564-4430-8022-4CAF93AB8D96
:: set name=Sync
:: set folder=%%userprofile%%\Sync
@grihabor
grihabor / Makefile.version
Last active May 27, 2024 13:36
Makefile to use for incremental semantic versioning
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))
@sandeepraju
sandeepraju / ttfb.sh
Created July 20, 2016 21:17
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@briandk
briandk / install-texlive-without-docs.py
Created July 20, 2016 20:55
Instal a full latex texlive on Ubuntu Xenial without any of the docs
import subprocess
get_line_by_line_texlive_dependencies = subprocess.run(
[
"apt-cache",
"depends",
"texlive-full"
],
universal_newlines=True,
stdout=subprocess.PIPE