Full tutorial: http://hofmannsven.com/2013/laboratory/wordpress-post-like-system/
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
use Drupal\node\NodeInterface; | |
use Drupal\Core\Template\Attribute; | |
use Drupal\Core\Url; | |
/** | |
* Implements hook_preprocess_page() for page.html.twig. | |
*/ | |
function THEME_preprocess_page(&$vars) { | |
// Add sitename and slogan to page. | |
$vars['site_name'] = \Drupal::config('system.site')->get('name'); |
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
--- | |
- hosts: 127.0.0.1 | |
connection: local | |
become: true | |
tasks: | |
- name: install wget | |
yum: | |
name: wget | |
state: present | |
- name: install openjdk |
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
{ | |
"notifications":{ | |
"slack":{ | |
"channel":"#business-listing", | |
"username":"statusok", | |
"channelWebhookURL":"https://hooks.slack.com/services/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" | |
} | |
}, | |
"database":{ | |
"influxDb":{ |
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
--- | |
- hosts: 127.0.0.1 | |
connection: local | |
become: true | |
tasks: | |
- name: install wget | |
yum: | |
name: wget | |
state: present | |
- name: install openjdk |
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 | |
/** | |
* Filter Elasticsearch posts by current language. | |
*/ | |
add_filter( 'ep_formatted_args', function( $formatted_args, $args ) { | |
if ( function_exists( 'pll_current_language' ) ) { | |
$lang = pll_current_language(); | |
if ( $lang !== false ) { |
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
Array | |
( | |
[from] => 0 | |
[size] => 54 | |
[sort] => Array | |
( | |
[0] => Array | |
( | |
[meta_value_num] => Array | |
( |
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
states = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", | |
"HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", | |
"MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", | |
"NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", | |
"SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"] |
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
us_state_abbrev = { | |
'Alabama': 'AL', | |
'Alaska': 'AK', | |
'Arizona': 'AZ', | |
'Arkansas': 'AR', | |
'California': 'CA', | |
'Colorado': 'CO', | |
'Connecticut': 'CT', | |
'Delaware': 'DE', | |
'Florida': 'FL', |
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/sh | |
# * eth0 = Internet interface (DHCP) | |
# * eth1 = LAN interface (192.168.1.0/24) | |
# * eth2 = DMZ interface (172.16.0.0/16) | |
# * Traffic open from firewall to internet | |
# * Traffic open and translated from LAN and DMZ to internet | |
# * Traffic open from LAN to Firewall | |
# * Traffic open from LAN to DMZ | |
# * Traffic open from internet to a DMZ web server |
NewerOlder