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
from elasticsearch import Elasticsearch | |
es = Elasticsearch(ELASTICSEARCH_URL) | |
doc = { | |
'author': 'Patito', | |
'text': 'Some text here, more text.', | |
'timestamp': datetime.now(), | |
} |
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 | |
set -x | |
awslocal s3api create-bucket --acl public-read --bucket patito-bucket | |
set +x |
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
--- | |
version: '3.7' | |
services: | |
localstack: | |
image: localstack/localstack | |
ports: | |
- 8080:8080 | |
environment: | |
- SERVICES=s3,es |
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
jQuery.mf_bind('add',function(){ | |
if('undefined' != typeof tinyMCEPreInit){ | |
if ( typeof tinymce !== 'undefined' ) { | |
for ( id in tinyMCEPreInit.mceInit ) { | |
init = tinyMCEPreInit.mceInit[id]; | |
$wrap = tinymce.$( '#wp-' + id + '-wrap' ); | |
if ( $wrap.hasClass( 'html-active' ) ){ | |
for ( id in tinyMCEPreInit.mceInit ) { |
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
jQuery.mf_bind('add',function(){ | |
if('undefined' != typeof tinyMCEPreInit){ | |
// this is for relative_urls when the main editor is on text mode | |
if ( typeof tinymce !== 'undefined' ) { | |
for ( id in tinyMCEPreInit.mceInit ) { | |
init = tinyMCEPreInit.mceInit[id]; | |
init.selector = ""; | |
tinymce.init( init ); | |
} |
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> | |
<script type="text/javascript"> | |
window.addEventListener('load', function(){ | |
document.body.addEventListener('touchstart', function(e){ | |
var el = document.getElementById("outside"); | |
el.innerHTML = "move in " + e.changedTouches[0].pageX; | |
}, false); | |
}); | |
</script> | |
<style> |
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 | |
function callback_categories_function() { | |
global $post; | |
$categories = get_the_category(); | |
$all = array(); | |
foreach ($categories as $cat) { | |
$all[] = $cat->category_nicename; | |
} | |
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
<FilesMatch "^(mf_upload)\.php$"> | |
<IfModule !mod_authz_core.c> | |
Order allow,deny | |
Allow from all | |
</IfModule> | |
<IfModule mod_authz_core.c> | |
Require all granted | |
</IfModule> | |
</FilesMatch> |
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
<FilesMatch "(RCCWP_upload|RCCWP_GetDuplicate)\.php$"> | |
<IfModule !mod_authz_core.c> | |
Order allow,deny | |
Allow from all | |
</IfModule> | |
<IfModule mod_authz_core.c> | |
Require all granted | |
</IfModule> | |
</FilesMatch> |
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
// Debug log \o/ | |
HKNormal(@"normal log without color, but whit the format of HK"); | |
HKVerbose(@"normal log with Verbose in gray"); | |
HKDebug(@"this line is with a debug word in %@",@"blue"); | |
HKInfo(@"a info log"); | |
HKWarning(@"oh, no, oh no, this is not happening"); | |
HKError(@"aahhhhh, help!!!!!!"); | |
HKAlt(@"alternative color"); | |
HKOpt(@"optional color"); |
NewerOlder