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
# DHCP Lease to Simple Queues | |
# 2014 Lonnie Mendez ([email protected]) | |
# | |
# Mikrotik RouterOS v6.9 | |
/ip dhcp-server lease | |
:foreach x in=[find] do={ | |
# grab variables for use below | |
:local leaseaddr ([get $x address]."/32") |
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
{ | |
"took": 4, | |
"_scroll_id": "", | |
"hits": { | |
"total": 1, | |
"max_score": 1, | |
"hits": [ | |
{ | |
"_score": 1, | |
"_index": "document", |
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
// Query | |
query := elastic.NewQueryStringQuery("6888*") | |
hl := elastic.NewHighlight() | |
hl = hl.Fields(elastic.NewHighlighterField("*")) | |
hl = hl.PreTags("<span>").PostTags("</span>") | |
result, err := client.Search(). | |
Index(indexname). | |
Highlight(hl). |
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
Run tests: | |
mix test | |
Run single test file: | |
mix test path/to/file | |
Run single test: |
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 | |
// encrypt | |
$text = json_encode(array( | |
'user' => 'username', | |
'first' => 'firstname', | |
'last' => 'lastname', | |
'any_data' => '11212 12123312 132 3' | |
)); | |
$key = 'zebc5adt0y345630gcj483bu3886ybz3'; |
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
!include LogicLib.nsh ;IF ELSE | |
!include "StrContains.nsh" | |
AutoCloseWindow true | |
OutFile "SimpleGemInstaller.exe" | |
;here you can reference to any other ruby version and set you prefer path | |
;you can use !define for compile time substitution |
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
# rake -T, --tasks [PATTERN] Display the tasks (matching optional PATTERN) with descriptions, then exit. | |
rake -T |