Start up the Docker container from image:
docker run --entrypoint "/bin/bash" --rm imagename:latest -c "sleep 24h"
Obtain the container hash id:
docker ps
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| #------------------------------------------------------------------------------- | |
| # NOTES: | |
| #------------------------------------------------------------------------------- | |
| # * Under the heading "CONFIG" below you'll find a number of configuration | |
| # parameters that must be personalized for your GitHub account and org. | |
| # Replace the `<CHANGE-ME>` strings with the value described in the comments | |
| # (or overwrite those values at run-time by providing environment variables). |
| import java.math.BigDecimal; | |
| import java.time.LocalDate; | |
| import java.time.LocalTime; | |
| import java.time.ZoneId; | |
| import java.time.ZonedDateTime; | |
| import java.time.temporal.TemporalAdjusters; | |
| import java.util.*; | |
| public class LegendOfEffectiveDate { |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Tabulator multivalue edit</title> | |
| <link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet"> | |
| <script type="text/javascript" src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="example-table"></div> |
| const moduleName = ((wnd,doc,$)=>{ | |
| 'use strict'; | |
| const onReady = (callback)=>{ | |
| if (doc.readyState !== "loading") | |
| callback(); | |
| else | |
| doc.addEventListener("DOMContentLoaded", callback); | |
| } | |
| onReady(()=>{ |
| # | |
| # cqlsh_intro.cql | |
| # | |
| # Copyright (C) 2017 Jeff Carpenter | |
| # Execute the commands in this file for a short guided tour of the CQL Shell (cqlsh) | |
| # | |
| # For more description, see Cassandra, The Definitive Guide 2nd Ed., Chapter 3: Installing | |
| # http://shop.oreilly.com/product/0636920043041.do | |
| # |
| private static String convertToGMT(String epoch) { | |
| Date date = new Date(Long.parseLong(epoch)); | |
| String GMT_FORMAT = "yyyy-MM-dd HH:mm:ss"; | |
| SimpleDateFormat dateFormat = new SimpleDateFormat(GMT_FORMAT); | |
| dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); | |
| // Calendar calendar = Calendar.getInstance(); | |
| // calendar.setTimeInMillis(entityAttribute.toInstant().toEpochMilli()); | |
| // calendar.setTimeZone(TimeZone.getTimeZone(entityAttribute.getZone())); |
| /** | |
| * This will mask a portion of a credit card with 'x' if it finds it in a sentence. | |
| \b(?: | |
| # Visa card number 4[\ -]*(?:\d[\ -]*){11}(?:(?:\d[\ -]*){3})?\d| | |
| # MasterCard card number (?:5[\ -]*[1-5](?:[\ -]*\d){2}|(?:2[\ | |
| -]*){3}[1-9]|(?:2[\ -]*){2}[3-9][\ -]*\d|2[\ -]* [3-6](?:[\ -]*\d){2}|2[\ | |
| -]*7[\ -]*[01][\ -]*\d|2[\ -]*7[\ -]*2[\ -]*0)(?:[\ -]*\d){12}| | |
| public List<EntityDate> findTodaysEntries() { | |
| LocalDateTime now = LocalDateTime.now(); | |
| return entity.findByEntityDateBetween(now.with(LocalTime.MIN), now.with(LocalTime.MAX)); | |
| } | |
| //Spring data retreive first 50 results with pageable; | |
| public List<AnEntity> retrieveFirst50() { | |
| Pageable pageable = new PageRequest(0, 50, Sort.Direction.DESC, "matchcode"); | |
| Page<AnEntity> all = anEntityRepository.findAll(pageable); |