Skip to content

Instantly share code, notes, and snippets.

View kgilmer's full-sized avatar

Ken Gilmer kgilmer

View GitHub Profile
@cjohnston1158
cjohnston1158 / ppa.py
Created May 6, 2020 20:13
Get version information for package(s) in a PPA
#!/usr/bin/python3
# Author: Chris Johnston <cjohnston@ubuntu.com>
# Initial inspiration from:
# https://gist.github.com/nathan-osman/b9158d058cc45916dcd20a591b66d0b4
from argparse import ArgumentParser
from sys import exit
try:
from launchpadlib.launchpad import Launchpad
from tabulate import tabulate
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 23, 2024 15:35
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@meoyawn
meoyawn / client.kt
Last active April 14, 2019 10:46
CLI instant messenger in 60 lines with ZMQ
package chat
import org.zeromq.ZMQ
import kotlin.concurrent.thread
fun main(args: Array<String>): Unit =
ZMQ.context(1).use { ctx ->
thread {
ctx.socket(ZMQ.SUB).use { stream ->
stream.connect(MESSAGE_STREAM)
@voldyman
voldyman / CellRenderer-treeview.vala
Last active October 17, 2021 18:56
This file shows how to use a custom cell renderer in a Gtk Treeview to build complex layouts
class MyCellRenderer : Gtk.CellRenderer {
// icon property set by the tree column
public Gdk.Pixbuf icon { get; set; }
public string text { get; set; }
public int progress { get; set; }
public int Padding;
private Gtk.CellRendererPixbuf icon_renderer;
private Gtk.CellRendererText text_renderer;
@dnishimura
dnishimura / Makefile.golang
Created June 20, 2012 17:51 — forked from yanatan16/Makefile.golang
Makefile for Golang projects
# Makefile for a go project
#
# Author: Jon Eisen
# site: joneisen.me
#
# Targets:
# all: Builds the code
# build: Builds the code
# fmt: Formats the source files
# clean: cleans the code
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r