/[!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/
Punctuations, include Unicode ones (\u2000-\u206F: general punctuations, \u2E00-\u2E7F: supplemental punctuations)
/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| ) |
| -- https://stackoverflow.com/questions/2341278/how-to-get-primary-key-of-table | |
| select | |
| kcu.column_name, | |
| kcu.table_name | |
| from | |
| information_schema.table_constraints tc | |
| join information_schema.key_column_usage kcu | |
| using(constraint_name, | |
| table_schema, |
| #! perl -slw | |
| use strict; | |
| ( my $input = do{ local $/; <DATA> } ) =~ tr[\n][]d; | |
| my $tab = 0; | |
| $input =~ s[([()])]{ | |
| $tab-- if $1 eq ')'; | |
| my $modified = "\n" . ( " " x $tab ) . $1; | |
| $tab++ if $1 eq '('; |
Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services,
no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.
Let's create a example foo service that when started creates a file, and when stopped it deletes it.
Create executable file /opt/foo/setup-foo.sh:
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # ---------------------------------------------------------------------------- | |
| # How to check if a string begins with some value in bash | |
| # | |
| # more cool examples here: https://www.cyberciti.biz/faq/bash-check-if-string-starts-with-character-such-as/ | |
| # ---------------------------------------------------------------------------- | |
| # | |
| # Let us define a shell variable called vech as follows: | |
| vech="Bus" | |
| # To check if string “Bus” stored in $vech starts with “B”, run: |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| "net/mail" | |
| "net/smtp" | |
| "crypto/tls" | |
| ) |
| buildscript { | |
| repositories { | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.8' | |
| classpath group: 'org.asciidoctor', name: 'asciidoctorj-diagram', version: '1.5.9' | |
| classpath group: 'org.asciidoctor', name: 'asciidoctorj-pdf', version: '1.5.0-alpha.16' | |
| } |