Skip to content

Instantly share code, notes, and snippets.

@purpleidea
purpleidea / rluks.sh
Created April 25, 2016 17:43
Mount your encrypted LUKS drives by uuid over SSH
#!/bin/bash
# rluks.sh: Mount your encrypted LUKS drives by uuid over SSH
# Copyright (C) 2016+ James Shubin, AGPLv3+
# Written by James Shubin <[email protected]>
# You probably want to modify the following globals to match your needs...
SERVER='server.example.com' # expected server for running script
HOSTNAME='myserver' # expected hostname for running locally
MEDIA='/media/' # mount/media directory, eg: /media/
declare -A MAP # create an associative array
@damncabbage
damncabbage / JSON - The JavaScript Subset That Isn't (Mirror).md
Last active March 30, 2023 07:37
JSON: The JavaScript Subset That Isn't (Mirror)

[Mirrored from the archive.org copy of http://timelessrepo.com/json-isnt-a-javascript-subset – the timelessrepo unfortunately... isn't. — Ed]

JSON: The JavaScript subset that isn't

Written by Magnus Holm.

From Wikipedia’s article on JSON:

JSON was based on a subset of the JavaScript scripting language.

All JSON-formatted text is also syntactically legal JavaScript code.

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@cravip
cravip / dhcpcd
Created January 22, 2013 18:08
dhcpcd
dhcpcd[8385]: version 5.6.4 starting
dhcpcd[8385]: eth0: sending IPv6 Router Solicitation
dhcpcd[8385]: eth0: rebinding lease of 10.100.91.89
dhcpcd[8385]: wlan0: waiting for carrier
dhcpcd[8385]: eth0: acknowledged 10.100.91.89 from 10.100.56.21
dhcpcd[8385]: eth0: checking for 10.100.91.89
dhcpcd[8385]: eth0: Router Advertisement from fe80::783a:cf78:eef4:bf4a
@alexanderjulo
alexanderjulo / celery-crontab.py
Created June 29, 2012 15:16
celery crontab example
from celery.schedules import crontab
from flask.ext.celery import Celery
CELERYBEAT_SCHEDULE = {
# executes every night at 4:15
'every-night': {
'task': 'user.checkaccounts',
'schedule': crontab(hour=4, minute=20)
}
}
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@cmeiklejohn
cmeiklejohn / .fonts.conf
Created November 18, 2011 02:57
fix debian chrome/chromium hinting problems since it doesn't obey the normal gnome settings
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >