Skip to content

Instantly share code, notes, and snippets.

@pklaus
pklaus / embedding_in_qt5.py
Last active March 24, 2023 07:56
Embedding Matplotlib Plots in PyQt5
#!/usr/bin/env python
# embedding_in_qt5.py --- Simple Qt4 application embedding matplotlib canvases
#
# Copyright (C) 2005 Florent Rougon
# 2006 Darren Dale
# with Updates from @boxcontrol
# <http://www.boxcontrol.net/embedding-matplotlib-plot-on-pyqt5-gui.html>
# <https://github.com/boxcontrol/matplotlibPyQt5>
#
@ertseyhan
ertseyhan / remount.sh
Created February 2, 2016 20:51
Temporarily increase size of tmp folder on Arch linux
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
@amingilani
amingilani / gh-pages-with-https.md
Last active October 21, 2021 18:48
gh pages with https

Always Available SSL Websites at $0

I have a secret that saves my clients a ton of money in the long run, keeps their website secure and has built in backups. I make their website static. I, then, store and host it with Github, and I finally use Cloudflare to serve it over HTTPS, and make it fast. My clients only ever pay for their domain name.

[TOC]

Why Static Content?

#!/bin/bash
ALARM='today 22:45'
SOUND='/home/sasha/Музика/'
sudo rtcwake -d rtc0 -m mem -t $(date +%s -d "$ALARM") -v && vlc -L $SOUND
@dvf
dvf / change-codec.md
Last active May 13, 2024 13:24
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@marcorichetta
marcorichetta / postgresql-manjaro.md
Last active May 16, 2024 17:37
Install PostgreSQL on Manjaro and set it up for Django
@phortuin
phortuin / postgres.md
Last active April 30, 2024 02:26
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)