Skip to content

Instantly share code, notes, and snippets.

@bj4rtmar
bj4rtmar / gist:4d517ecdeab9976b6b1fb80ce283bc69
Created November 26, 2020 11:10
Install latest release candidate of tmux on Centos 7
# My system:
$ rpm -q centos-release
centos-release-7-9.2009.0.el7.centos.x86_64
$ sudo yum check-update
$ sudo yum -y install autoconf automake pkg-config libevent-devel ncurses-devel
$ sudo yum groupinstall "Development tools"
Then follow the instructions in the "From version control" section on https://github.com/tmux/tmux
@bj4rtmar
bj4rtmar / phpmime_to_json.pl
Last active March 4, 2016 10:18
Converts text file, with a php array of file extensions to mimetypes, to JSON
use strict;
use warnings;
use JSON;
use Getopt::Long;
my %options;
GetOptions(\%options,
'help',
'reverse|r', # Mimetype to list of extensions. Default is to print Extensions to list of Mimetypes
) or die $!;
@bj4rtmar
bj4rtmar / ext_to_mimetype.json
Created March 4, 2016 10:12
File extensions to mime formats. JSON format. Converted from https://gist.github.com/nimasdj/801b0b1a50112ea6a997 (version from 16 November 2015)
{
"123": [
"application/vnd.lotus-1-2-3"
],
"3dm": [
"x-world/x-3dmf"
],
"3dmf": [
"x-world/x-3dmf"
],
@bj4rtmar
bj4rtmar / mimetype_to_ext.json
Created March 4, 2016 09:50
Mime types to file extensions. JSON format. Converted from https://gist.github.com/nimasdj/801b0b1a50112ea6a997 (version from 16 November 2015)
{
"aapplication/octet-stream": [
"saveme"
],
"applicaiton/x-bytecode.python": [
"pyc"
],
"application/acad": [
"dwg"
],