Skip to content

Instantly share code, notes, and snippets.

View ChrisTimperley's full-sized avatar

Chris Timperley ChrisTimperley

View GitHub Profile
In order to work the Bose QC35 Headset Bluetooth do the following:
- sudo pacman -Syu pulseaudio-alsa pulseaudio-bluetooth bluez bluez-libs bluez-utils
- turn off bluetooth from your computer
- sudo btmgmt ssp of
- gpasswd -a YOUR_USER lp
@mbinna
mbinna / effective_modern_cmake.md
Last active April 18, 2024 19:26
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@mosquito
mosquito / README.md
Last active April 18, 2024 11:43
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
@ChrisTimperley
ChrisTimperley / installing-arch.md
Last active December 1, 2023 17:25
Instructions for installing Arch Linux and i3 onto a Dell Inspiron 7537

Arch Linux

GRUB Installation

Be sure to replace /dev/sda with the name of the drive (n.b. not the partition) containing Arch.

# pacman -S grub-bios intel-ucode
# grub-install /dev/sda
# mkinitcpio -p linux
@kekru
kekru / Docker connect to remote server.md
Last active April 15, 2024 16:26
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@Himanshu-Mishr
Himanshu-Mishr / theme
Created May 6, 2015 07:36
126 Themes for Terminal (Elementary OS)
#!/bin/bash
# Download it.
# Name it as 'theme'
# Place it in /usr/bin/
# shell_prompt$ theme
echo '
3024 Day ( 1) 3024 Night ( 2) AdventureTime ( 3)
Afterglow ( 4) AlienBlood ( 5) Argonaut ( 6)
Arthur ( 7) Atom ( 8) Belafonte Day ( 9)
Belafonte Night ( 10) BirdsOfParadise ( 11) Blazer ( 12)
@clchiou
clchiou / non_graceful_shutdown.py
Created March 19, 2015 04:32
Python ThreadPoolExecutor (non-)graceful shutdown
#!/usr/bin/env python3
import concurrent.futures.thread
import sys
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
def remove_file(path):
print('Removing file %s' % path)
@cortesben
cortesben / hg-commands.md
Last active January 9, 2024 14:53
Mercurial command cheat sheet

Mercurial Commands

Commands Description
hg pull get latest changes like git pull use flags like -u IDK why yet
hg add only for new files
hg commit add changes to commit with -m for message just like git
hg addremove adds new files and removes file not in your file system
hg incoming see changes commited by others
hg outgoing see local commits
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007