Skip to content

Instantly share code, notes, and snippets.

@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@felipec
felipec / aur-check
Last active May 5, 2021 08:08
Script to check AUR packages
#!/usr/bin/env ruby
# This script checks all your foreign packages against AUR to find newer versions
require 'net/http'
require 'json'
$packages = {}
$all = false
@yeokm1
yeokm1 / Octoprint on read-only Arch Linux ARM for Raspberry Pi.md
Last active October 15, 2022 13:18
Use Octoprint on Arch Linux ARM with read-only file system for Raspberry Pi

I wanted Octoprint (a 3D-printer management software) to start up fast without the bloatness of using Raspbian. I also regularly forgot to shutdown the Raspberry Pi hosting Octoprint properly leading to file system corruption and unbootable SD card.

This set of instructions should provide all that is needed to use Octoprint without fear of improper shutdown with Arch Linux ARM by using a read-only file system.

This instructions does not have the webcam setup as I didn't intend to use it. If you wish to use the webcam, please consult and try to port the official Raspbian FAQ.

##Instructions

  1. Convert the Arch Linux ARM file system to read-only. Please follow the instructions from my previous gist. The following instructions assume you are logged into with the root account.
@yeokm1
yeokm1 / Read-only FS on Arch Linux ARM.md
Last active August 18, 2023 05:43
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@xoan
xoan / myheadings.sty
Created January 25, 2012 21:30
Header / Footer in LaTeX with fancyhdr
\usepackage{fancyhdr}
\setlength{\headheight}{14pt}
\renewcommand{\headrulewidth}{0pt}
% Need to define \titlename and \authorname
%% Inner Header / Outer Footer
\lhead[]{\fancyplain{}{\footnotesize\titlename}}
\rhead[\footnotesize\nouppercase\authorname]{}
\lfoot[\thepage]{}
@stchris
stchris / getimg.py
Created February 19, 2011 13:34
Improved version of getimg.sh - gets the 'image of the day' from NASA, writes the summary onto the image and sets it as the Gnome wallpaper.
#!/usr/bin/env python
"""
getimg.py
Gets the current image of the day from NASA and sets it as the
background in Gnome. The summary / description text is written
to the image.
Requires:
PIL (apt-get install python-imaging or pip install PIL)
@tjlytle
tjlytle / imageColor.php
Created November 17, 2009 19:19
Class to find 'average' image color.
<?php
/**
* imageColor
*
* Shows three methods to find the 'average' image color.
*
* Each function expects a gd image object.
*
* imageColor::averageResize($image) resizing to 1px, and checking the color.
* imageColor::averageBorder($image) find the average color of all border pixels.