https://dev.openwrt.org/ticket/20757#ticket
This file contains hidden or 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
func initElasticsearch() (*elasticsearch.Client, error) { | |
connectionString := fmt.Sprintf("%s:%s", "server-url", "server-port") | |
cfg := elasticsearch.Config{ | |
Addresses: []string{connectionString}, | |
Username: "username", | |
Password: "password", | |
} | |
es, err := elasticsearch.NewClient(cfg) |
This file contains hidden or 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
I fixed my problem with accents using PHPStorm. That is the solution which worked for me. | |
I'm using ElementaryOS, but the problem occours in Ubuntu too. | |
- Find phpstorm.sh | |
$> find -name phpstorm.sh | |
- Edit the most recent phpstorm.sh version |
This file contains hidden or 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 | |
/** | |
* Send a Message to a Slack Channel. | |
* | |
* In order to get the API Token visit: https://api.slack.com/custom-integrations/legacy-tokens | |
* The token will look something like this `xoxo-2100000415-0000000000-0000000000-ab1ab1`. | |
* | |
* @param string $message The message to post into a channel. | |
* @param string $channel The name of the channel prefixed with #, example #foobar |
This file contains hidden or 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 | |
//Options | |
$token = 'YOUR_TOKEN_HERE'; | |
$domain = 'YOUR_SLACK_DOMAIN_GOES_HERE'; | |
$channel = '#general'; | |
$bot_name = 'Webhook'; | |
$icon = ':alien:'; | |
$message = 'Your message'; |
This file contains hidden or 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.each($('input, select'), function() { | |
if($(this).prop('required')) { | |
$('label[for="'+$(this).attr('id')+'"]').after('<span style="color:red">*</span>'); | |
} | |
}); |
This file contains hidden or 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 | |
// DEFINE our cipher | |
define('AES_256_CBC', 'aes-256-cbc'); | |
// Generate a 256-bit encryption key | |
// This should be stored somewhere instead of recreating it each time | |
$encryption_key = openssl_random_pseudo_bytes(32); | |
// Generate an initialization vector | |
// This *MUST* be available for decryption as well |