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
| #!/bin/bash | |
| service_name="backup-all-secrets" | |
| secret_list=( `docker secret ls --format "{{ .Name }}"` ) | |
| cmd="docker service create \ | |
| --name $service_name \ | |
| --constraint node.hostname==`hostname` " | |
| for secret in "${secret_list[@]}" |
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
| # Sets CORS headers for request from example1.com and example2.com pages | |
| # for both SSL and non-SSL | |
| SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0 | |
| Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN | |
| Header set Access-Control-Allow-Credentials "true" env=ORIGIN | |
| # Always set Vary: Origin when it's possible you may send CORS headers | |
| Header merge Vary Origin |
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 <PubSubClient.h> | |
| #include <ESP8266WiFi.h> | |
| const char* ssid = "................."; | |
| const char* password = "................"; | |
| char* topic = "esp8266_arduino_out"; | |
| char* server = "iot.eclipse.org"; | |
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
| package arpad.kosa; | |
| import java.io.*; | |
| import java.util.*; | |
| import java.util.regex.Pattern; | |
| import java.util.stream.Collectors; | |
| public class OneNumberGame { | |
| List<Player> players = new ArrayList<>(); |
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
| package arpad.kosa; | |
| import org.junit.Assert; | |
| import org.junit.Test; | |
| import java.io.*; | |
| public class TestOneNumberGame { | |
| private static final String SAMPLE_GAME = "1 1 2 3 5 4 Arpad\n1 1 2 3 5 3 Elod\n2 2 2 2 2 2 Ond"; | |
| private static final String SAMPLE_GAME_NO_ONE = "3 1 2 3 5 4 Arpad\n3 1 2 3 5 3 Elod\n2 2 2 2 2 2 Ond"; |
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
| ############### two scripts inside ####### | |
| ############### One group only ############## | |
| import com.liferay.portlet.documentlibrary.util.* | |
| import com.liferay.portlet.documentlibrary.lar.* | |
| import com.liferay.portlet.documentlibrary.service.* | |
| import com.liferay.portal.service.* | |
| import com.liferay.portlet.documentlibrary.model.* | |
| import com.liferay.portal.kernel.dao.orm.* |
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
| ## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context | |
| #set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) | |
| ## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance | |
| #set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) | |
| ## call to the retrieve all records of the list |
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
| ; TextPad keyword syntax file for Freemarker | |
| ; Contributed by Simon Schoeters, version 0.2 | |
| HTML=1 | |
| [Syntax] | |
| Namespace1 = 2 | |
| IgnoreCase = Yes | |
| KeyWordLength = | |
| BracketChars = {}[]() |