Color your ls and tree output based on file and directory
names/extensions.
Should support most any 256-color capable terminal.
Clone this repo. In my case this is:
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:foo@example.com", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
| #!/usr/bin/perl | |
| # Author: Todd Larason <jtl@molehill.org> | |
| # $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $ | |
| # use the resources for colors 0-15 - usually more-or-less a | |
| # reproduction of the standard ANSI colors, but possibly more | |
| # pleasing shades | |
| # colors 16-231 are a 6x6x6 color cube | |
| for ($red = 0; $red < 6; $red++) { |
| #!/usr/bin/env python3 | |
| """ | |
| Script to test HTTP mirrors of Cygwin by measuring download times. | |
| Originally written in 2011, modernized in 2025. | |
| """ | |
| from math import floor | |
| from urllib.request import urlopen | |
| import argparse | |
| import sys |
| #!/bin/sh -e | |
| #git-cache-meta -- simple file meta data caching and applying. | |
| #Simpler than etckeeper, metastore, setgitperms, etc. | |
| #from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694 | |
| #modified by n1k | |
| # - save all files metadata not only from other users | |
| # - save numeric uid and gid | |
| # 2012-03-05 - added filetime, andris9 |
| /* | |
| Copyright (c) 2017 Chris Patuzzo | |
| https://twitter.com/chrispatuzzo | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| #!/usr/bin/env python | |
| ## Tiny Syslog Server in Python. | |
| ## | |
| ## This is a tiny syslog server that is able to receive UDP based syslog | |
| ## entries on a specified port and save them to a file. | |
| ## That's it... it does nothing else... | |
| ## There are a few configuration parameters. | |
| LOG_FILE = 'youlogfile.log' |
| g_LastCtrlKeyDownTime := 0 | |
| g_AbortSendEsc := false | |
| g_ControlRepeatDetected := false | |
| *CapsLock:: | |
| if (g_ControlRepeatDetected) | |
| { | |
| return | |
| } |
| #!/usr/bin/python -O | |
| ################################################################################ | |
| ################################################################################ | |
| # | |
| # State-Based Text Merging Algorithm | |
| # For 6.033 Design Project 2 | |
| # TA: Katherine Fang | |
| # 9 May 2012 | |
| # |
| #!/usr/bin/python | |
| # Based on https://gist.github.com/provegard/1536682, which was | |
| # Based on getifaddrs.py from pydlnadms [http://code.google.com/p/pydlnadms/]. | |
| # Only tested on Linux! | |
| from socket import AF_INET, AF_INET6, inet_ntop | |
| from ctypes import ( | |
| Structure, Union, POINTER, | |
| pointer, get_errno, cast, |