Skip to content

Instantly share code, notes, and snippets.

View Fred-Barclay's full-sized avatar
💭
On the way to Mars

Fred Barclay Fred-Barclay

💭
On the way to Mars
  • Bumping around in the bush.
View GitHub Profile
@Fred-Barclay
Fred-Barclay / get_last_commit.py
Created January 15, 2019 22:38
Find the checksum of the most recent commit in a GitHub repository
#!/usr/bin/env python3
"""
Get the sha sum of the last commit on the master branch
of a github repository.
Suitable for using in shell scripts: i.e.
last_commit=`python3 ~/bin/get_last_commit.py $url` will
assign the sha sum of the last commit found at $url
to $last_commit. In this case (for bash at least)
print(shasum) will not actually print the sha sum to the
@Fred-Barclay
Fred-Barclay / brave.prfile
Created December 25, 2018 17:02
New brave profile
# Firejail profile for brave
# This file is overwritten after every install/update
# Description: Web browser that blocks ads and trackers by default.
# Persistent local customizations
include brave.local
# Persistent global definitions
include globals.local
noblacklist ${HOME}/.config/brave
noblacklist ${HOME}/.config/BraveSoftware
fred@lmde-beta ~ $ gufw
(gufw.py:4006): Gtk-CRITICAL **: gtk_list_store_iter_next: assertion 'priv->stamp == iter->stamp' failed
(gufw.py:4006): Gtk-CRITICAL **: /home/clem/Sandbox/gtk/./gtk/gtktreeview.c:5495 (gtk_tree_view_bin_draw): assertion `has_next' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel. This generally means that the model has changed
without letting the view know. Any display from now on is likely to
be incorrect.
@Fred-Barclay
Fred-Barclay / gist:2f09a203341dd97d2b23651e5f4af251
Created September 30, 2018 00:50
LMDE 3 packages from deb-multimedia
ii libasound2-plugins:amd64 1:1.1.4-dmo1 amd64 ALSA library additional plugins
ii libavcodec57:amd64 10:3.3.8-dmo1+deb9u1 amd64 Library to encode decode multimedia streams - runtime files
ii libavformat57:amd64 10:3.3.8-dmo1+deb9u1 amd64 FFmpeg file format library
ii libavutil55:amd64 10:3.3.8-dmo1+deb9u1 amd64 FFmpeg avutil library - runtime files
ii libbabl-0.1-0:amd64 1:0.1.28-dmo1 amd64 Dynamic, any to any, pixel format conversion library
ii libbluray2:amd64 2:1.0.0-dmo1 amd64 Blu-ray disc playback support library (shared library)
ii libchromaprint1:amd64 1:1.4.2-dmo1 amd64 Audio fingerprint library
ii libfdk-aac1:amd64 1:0.1.5-dmo2 amd64 Fraunhofer FDK AAC co
@Fred-Barclay
Fred-Barclay / gist:c55529dc47075a1e4cb4e08a5dc46dce
Created September 30, 2018 00:53
LMDE 3 all potential packages from deb-multimedia
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: 2mandvd
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: 2mandvd-data
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: aacgain
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: aacplusenc
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: aacskeys
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: acoustid-fingerprinter
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: acroread-debian-files
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: acroread-fonts-jpn
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd64_Packages:Package: advancemenu
/var/lib/apt/lists/www.deb-multimedia.org_dists_stretch_main_binary-amd
wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && \
chmod +x wireless-info && \
./wireless-info
#!/bin/bash
#
# Copyright (c) 2012
#
# Authors: Wild Man, Krytarik
# Helpers: chili555
#
# This script gathers the infos necessary for troubleshooting a wireless
# connection and saves them in a text file, wrapping it in an archive if it
# exceeds the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums.
/*
* Copyright (C) 2017 Firejail Authors
*
* This file is part of firejail project
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
function [ distance ] = GetDistanceUnstable( subPT, vertPT, deg_Increment )
% Code originally written by Skylar Gay
% and W. Scott Ingram at the University
% of Texas M. D. Anderson Cancer
% Center, Houston, Texas. All copies of
% this code, even if modified, must
% contain this message.
% No warranty or fitness for duty is
% expressed or implied by the authors.
function [ distance ] = GetDistanceTesting( subPT, vertPT, deg_Increment )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
tic
theta=(0:deg_Increment:(360-deg_Increment));
%Sets the value of theta from 0 degrees to the largest angle that is not
%coterminal with 0 degrees and <360 degrees.
numVert=(numel(vertPT))/2;