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
import csv | |
import sys | |
import logging | |
def transcribe(spelling): | |
defaults = { | |
'a': '?A', # Either long/tense or short/lax; use Wiktionary transcription to resolve | |
'ą': 'aː', | |
'b': 'b', | |
'c': 'ts', |
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
<!DOCTYPE html> | |
<html lang="lt"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Pašto indeksai</title> | |
<script | |
src="https://code.jquery.com/jquery-3.2.1.js" | |
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" | |
crossorigin="anonymous"></script> | |
<style type="text/css"> |
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
<?php | |
# Ad-hoc code for a hypothetical method named Filesystem::contains. | |
$replacement = function($path) use (&$replacement, &$handle) { | |
# Run code before the original function | |
echo 'Before', PHP_EOL; | |
# Make this replacement function disable itself | |
Patchwork\undo($handle); | |
# Call the original function |
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
<?php | |
require __DIR__ . "/path/to/Patchwork.php"; | |
use Patchwork\Preprocessor as pp; | |
pp\attach(array(function(pp\Source $s) | |
{ | |
$needle = "var_dump"; # The function to replace | |
$replacement = "customDump"; # The replacement |