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
% pwd | |
/tmp/ex | |
% mkdir old | |
% echo "0xFF 255 11111111" > old/stuff | |
% echo "192.168.0.0/16" > old/net | |
% cp -R old new | |
% echo "192.168.2.0/24" > old/net | |
% echo "0xF0 240 11110000" > old/stuff | |
% diff -r -u old/ new/ > patchfile | |
% cat patchfile |
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
% docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
0069ffd119ae mysql:5 "/entrypoint.sh mysq 7 minutes ago Up 7 minutes 0.0.0.0:49153->3306/tcp mysql | |
% mysql -u root -h 192.168.59.103 -P 49153 -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 2 | |
Server version: 5.6.24 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
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
/** | |
* destroy instance of wymeditor: | |
* - updates content between iframe and textarea | |
* - remove iframe | |
* - show textarea | |
* - replace element with undefined (to trick jQuery.getWymeditorByTextarea(el)) | |
* @see https://github.com/wymeditor/wymeditor/blob/master/src/wymeditor/core.js#L520 | |
* @param {WYMeditor.editor} instance | |
*/ | |
var wymeditor_destroy = function (instance) { |
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
$ perl -mIO::Socket -e 'my $s = new IO::Socket::INET(Listen => 1, LocalAddr => "localhost", LocalPort => 8888, Proto => "tcp"); my $data = $s->accept(); while (<$data>) { print $_; } close($s);' |
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 | |
/** | |
* Plugin Name: XMLRPC archive | |
* Plugin Uri: http://localhost/ | |
* Description: Extend Wordpress API to get archives | |
* Version 1.0 | |
* Author: John Doe | |
*/ | |
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 | |
$entity = 'node'; | |
$field_name = 'employee_first_name'; | |
$bundle = 'employee'; | |
$lang_code = 'fi'; | |
$value = 'Nimi'; | |
// get field instance | |
$instance = field_info_instance($entity, $field_name, $bundle); |