Replace all instances of
begin
statement
end until condition
with
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
module Cinch | |
module Plugins | |
class PluginManagement | |
include Cinch::Plugin | |
match(/plugin load (\S+)(?: (\S+))?/, method: :load_plugin) | |
match(/plugin unload (\S+)/, method: :unload_plugin) | |
match(/plugin reload (\S+)(?: (\S+))?/, method: :reload_plugin) | |
match(/plugin set (\S+) (\S+) (.+)$/, method: :set_option) | |
def load_plugin(m, plugin, mapping) |
#include <SDL2/SDL.h> | |
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav" | |
// prototype for our audio callback | |
// see the implementation for more information | |
void my_audio_callback(void *userdata, Uint8 *stream, int len); | |
// variable declarations | |
static Uint8 *audio_pos; // global pointer to the audio buffer to be played |
/* Solarized Dark | |
For use with Jekyll and Pygments | |
http://ethanschoonover.com/solarized | |
SOLARIZED HEX ROLE | |
--------- -------- ------------------------------------------ | |
base03 #002b36 background | |
base01 #586e75 comments / secondary content |
#!/usr/bin/python | |
import os | |
import xcb | |
from xcb.xproto import * | |
from PIL import Image, ImageFilter | |
XCB_MAP_STATE_VIEWABLE = 2 | |
def screenshot(): |
1. enable debugger in rosalina menu | |
go to process list | |
select a process | |
2. launch arm-none-eabi-gdb <path to elf> | |
command "target remote ip:port" | |
3. command "continue" or "c" to resume execution | |
4. |
#--------------------------------------------------------------------------------- | |
# devkitPPC rules for building with Clang | |
# | |
# How to use: | |
# - Copy this file into your DEVKITPPC path: | |
# cp wii_clang_rules $DEVKITPPC | |
# | |
# - Link Clang into your DEVKITPPC path: | |
# ln -s `which clang` $DEVKITPPC/bin/powerpc-eabi-clang | |
# |
Important
Current version of this code has moved into a proper GitHub repository: https://github.com/palant/opensmtpd-filters
The OpenSMTPD documentation currently suggests using either opensmtpd-filter-dkimsign
or opensmtpd-filter-rspamd
for DKIM support. The former lacks functionality and requires you to compile code from some Austrian web server yourself. The latter is overdimensioned for my needs. So I’ve written my own fairly simple filters in Python.
These filters require Python 3 with dkimpy module installed. You can optionally install pyspf module as well, if you want dkimverify.py
to perform SPF verification as well.