Skip to main content

Strike against censorship. Stop the Internet Blacklist Bills (SOPA and PIPA). Read more…

BedroomLAN

Tilde~A: Alexios' Homepage

Search form

Primary navigation

  • Home
  • Projects
  • Coding
  • Writing
  • Hardware
  • Miscellany
  • Tools and Toys

You are here

Home » recipes

recipes

Incremental MySQL Maintenance Script

Submitted by alexios on Thursday, 2011-10-13 — 20:41

You run a medium-to-large size MySQL server with lots of databases, possibly for hosted websites. You've experienced performance degradation. You've fine-tuned your database engines, and no joy. Then you finally realise you need to run mysqloptimize, and the day is saved! Good on you. Of course, running mysqloptimize on a large server still takes half an ice age.

Tags: 

  • mysql
  • bash
  • recipes

Cleaning Up a Debian APT Archive Cache

Submitted by alexios on Friday, 2011-05-13 — 11:59

You have a Debian, Ubuntu or similar installation, and your /var partition keeps getting full when you upgrade. You check /var/cache/apt/archives and find it full of the usual mix of current and old versions of downloaded packages. Somehow, they haven't been deleted after installation, or you keep downloading them but not installing them. You now need a quick and clever way of cleaning up this mess, so only the latest version of each package remains.

Tags: 

  • debian
  • linux
  • recipes

Too Many Unknown PCI Devices

Submitted by alexios on Wednesday, 2011-04-06 — 13:56

You just bought a shiny new motherboard, but the Linux kernel doesn't recognise some (or all) of the on-board PCI devices. Time to panic?

Tags: 

  • debian
  • linux
  • recipes

Renaming MP3s

Submitted by alexios on Wednesday, 2011-04-06 — 13:53

Let's say you have a large collection of incorrectly labelled, or downright unlabelled MP3 files arranged in directories by artist. Each artist directory contains one subdirectory per album, with untagged files under them. You need these files ID3-tagged with some basic information, namely the artist and album.

Tags: 

  • recipes
  • unix

Pascal's Triangle in Python

Submitted by alexios on Wednesday, 2011-04-06 — 13:48

You need to generate Pascal's Triangle in Python, and you're lazy (an admirable trait). Alternatively, you're looking for a Pascal's Triangle generator that can show really high-ranking rows, ones with multi-hundred-digit (or multi-million-digit) coefficients.

Tags: 

  • maths
  • python
  • recipes

Pascal's Triangle for LaTeX

Submitted by alexios on Wednesday, 2011-04-06 — 13:32

You need to display Pascal's Triangle in a LaTeX document and whenever you hear ‘ampersand’ or ‘smallskip’, you go into a homicidal rage, leaving behind you a trail of viscera and blood-stained Lion Book pages. Also, you're lazy. Put that chainsaw down, this recipe is for you.

Tags: 

  • latex
  • maths
  • python
  • recipes

Linux RAID One-Liners

Submitted by alexios on Wednesday, 2011-04-06 — 13:30

Here are some useful one-liner recipes to help manage Linux Device Mapper (sometimes also known as ‘software RAID’) devices. These are too short to warrant separate recipes. They're here because I need them for myself: no matter how many times I've done this, I always check again.

Tags: 

  • linux
  • recipes

Flatten a Directory Structure

Submitted by alexios on Wednesday, 2011-04-06 — 13:28

You have a deep directory tree of files, and you need to flatten it into a single directory, so that there are no files in subdirectories, and all the files are in the same place.

Tags: 

  • recipes
  • unix

Detecting ‘Idle’ and ‘Away’ Timeouts in Javascript

Submitted by alexios on Tuesday, 2011-04-05 — 22:03

A short Javascript program to improve detection of users idling or away from their keyboards, which should in turn improve how online users are detected. The file works with both jQuery and Prototype. It autodetects which is available at load time.

Tags: 

  • javascript
  • jquery
  • prototype
  • recipes

Cleaning Up a Debian APT Archive Cache

Submitted by alexios on Tuesday, 2011-04-05 — 21:59

You have a Debian, Ubuntu or similar installation, and your /var partition keeps getting full when you upgrade. You check /var/cache/apt/archives and find it full of the usual mix of current and old versions of downloaded packages. Somehow, they haven't been deleted after installation, or you keep downloading them but not installing them. You now need a quick and clever way of cleaning up this mess, so only the latest version of each package remains.

Tags: 

  • debian
  • linux
  • recipes
  • cleanup
  • apt
Subscribe to RSS - recipes

Here's What We Have

  • Home
  • Projects
    • ansi2img: ANSI Rasteriser
    • Acrobase BBS Client
    • DungeonMaker
    • DungeonSpawn
    • Python-Dungeonspawn
    • Extension:Embargo
    • libastar
    • ttyconv
    • evrouter
    • lmctl
    • RSAR
    • Kareltima
    • PalmOS Apps
    • RGA: The Roguelike Graphics Adapter
    • ROMtools
    • evrouter 2
    • mcasm
  • Coding
    • Linux RAID One-Liners
    • APT Archive Cleanup
    • DLT Labels
    • Amanda DLT Tape Label
    • Amanda 8mm Tape Label
    • S2 Moon Phase
    • JavaScript Timeout
    • Duotone
    • Full Frame
    • Photo Frame
    • Renaming MP3s
    • USBTouchScreen Patch
    • Cleaning Up APT Caches
    • Pascal's Triangle in Python
    • Pascal's Triangle for LaTeX
    • Flatten a Directory Structure
    • Too Many Unknown PCI Devices
    • Signature Befunge
    • Soup!
    • Data Recovery... Not
    • Incremental MySQL Maintenance Script
  • Writing
    • Ελληνική Πληκτρολόγηση
    • Η χρήση των δϊαλϋτϊκών
    • Guide to Greek Sexuality
    • How Many Poly People…?
    • 50­— εμ, 15 τρόποι
    • Ε.Α.Π.Κ.
    • Ε.Α.Π.Κ. (LGU Edition)
    • Acrobase BBS FAQ
      • Τι είναι η Acrobase
      • Τεχνικά ζητήματα
      • Περίεργα, παράπονα κλπ
      • Ακροβασιανοί: έργα και ημέρες
      • Προνόμια
      • Διάφορα
      • Ορολογία
    • Oric C Programming
      • Introduction
      • Using the Compiler
      • Simple Data Types and Variables
      • Expressions
      • Operators
        • Arithmetic Operators
        • Conditions, Comparisons and Logic
        • Bitwise Operators
        • The Strange Ones
      • Operator Precedence
      • Statements
        • Special Statements
        • Branching
        • Loops
      • Intermission
      • Functions
      • Iteration vs. Recursion
      • Data Structures
        • Arrays
        • Strings
        • Inner Sanctum
        • Composite Data Structures
        • Enumerated Types
        • Name It!
        • Unions
    • Blood 'n' Iron Rulebook
  • Hardware
    • Fungus
      • Introduction
      • Design Aims
      • Data Path
      • Programming Model
      • CPU Architecture
      • Instruction Set
      • Instruction Reference
        • Arithmetic/Logic Binary Operations
        • Arithmetic/Logic Unary Operations
        • Literals
        • Memory Input/Output
        • Flow Control
    • Sun Monitors on PCs
    • Sun keyboards on USB
    • The Oric IDE Interface
    • An Unusual Apple II Joystick
    • Flash RAM Programmer
    • The CFT Mini Computer
      • CFT Project Log
        • Control Unit rev D routed
        • Emulator Back in Working Order
        • Whoops! Major Revision
        • Major Register Board Routed
        • Front Panel Draft
        • CFT Assembly Examples
        • Front Panel Schematic
        • Front Panel Operations Guide, Rev A
        • Front Panel Controller Board
        • The Switch to SMD
  • Miscellany
    • Acrobase Logo
    • Celtic Knotwork
    • Menasat Font
    • Obscure Greek Political Parties
    • The Oric Logo in Vector Format
  • Tools and Toys
    • Polyamory Graph Explorer
    • ANSI-to-PNG
    • Befunge '93 Playground
    • DLT Label Creator

Photos on Flickr

Dimitsana Café

Here

  • BedroomLAN Debian Repository
  • Downloads
  • Debian Packages
  • The Oric Software Page
  • My GnuPG public key

Find me on...

  • Google+
  • Flickr
  • Linked In
  • Twitter
  • Diaspora*

Other Places

  • Civic
  • The Kinky Café

Unless otherwise stated, all content on this page is Copyright © 1994–2012 Alexios Chouchoulas. All rights are reserved. Trademarks and copyrights belonging to third parties mentioned above are all acknowledged. Any opinions inadvertently expressed are mine! All mine! Mwahahahahaha!

Όλο το υλικό του ιστοτόπου (sic) είναι πρωτότυπο. Copyright © 1994–2012 Alexios Chouchoulas. Απαγορεύεται η αναδημοσίευση χωρίς την άδεια του συγγραφέα, ο οποίος θα χαρεί να τη δώσει αν κάποιος (επιτέλους) του τη ζητήσει.