This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> MWtoIPA = { | |
u' ': u' ', | |
u"'": u"'", | |
u"'\u0259": u"'\u028c", | |
u',': u',', | |
u',\u0259': u',\u028c', | |
u'-': u'.', | |
u'\\': u'/', | |
u'/': u'/', | |
u'(': u'(', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTML numbered entity (hex) to unicode string | |
>>> entity = 'ǎ' | |
>>> unichr(int(entity[3:],16)) | |
u'\u01ce' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The .htaccess file in the folder "forum" | |
RewriteEngine On | |
RewriteBase /forum/ | |
RewriteCond %{REQUEST_URI} ^/?register\.php.* | |
RewriteCond %{HTTP_REFERER} !.*eggcorns.lascribe.net.* [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^$ | |
RewriteRule .* - [F] | |
# OR: in the .htaccess file in the web site root | |
RewriteEngine On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
localetest.py - tests collation / sort order for various Latin-script locales | |
Correct output: | |
The order for German is: | |
LATIN SMALL LETTER A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <locale.h> | |
int main (void) { | |
struct lconv locale_structure; | |
struct lconv *locale_ptr = &locale_structure; | |
char *a = "ä"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <wchar.h> | |
#include <locale.h> | |
#define MYLOCALE "de_DE.UTF-8" | |
int main (void) { | |
struct lconv *locale_ptr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <wchar.h> | |
#include <locale.h> | |
#define MYLOCALE "de_DE.UTF-8" | |
int widecharcomp(const wchar_t *arg1, const wchar_t *arg2) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fixing permissions for group members. System default is UMASK 077 or 022, | |
# which makes file invisible to members of the group. | |
# | |
# This script recursively sets: | |
# * all directories under the given directory to 775 | |
# * all files under the given directory to 664 | |
# That is, the owner and group members have full rwx permissions, | |
# and others can access all directories and read, but not write/delete files. | |
# |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer