We will use minimalistic Linux distribution called Alpine (5MB)
FROM alpine:latest
RUN apk --update add redis
package main | |
import ( | |
"fmt" | |
) | |
func isValidChunk(s string) bool { | |
stack := make([]rune, 0) | |
for _, ch := range s { |
root = true | |
[*] | |
insert_final_newline = true | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
indent_style = space | |
indent_size = 2 | |
[{Makefile,go.mod,go.sum,*.go}] |
#!/bin/sh | |
# git-clone-github | |
# Clone a Github repository into a new directory with user as prefix | |
# Usage: git clone-github github-repo-url | |
set -e | |
clone_url=$1 | |
if [[ $clone_url != https://github.com/* && $clone_url != http://github.com/* ]] | |
then |
<?php | |
namespace Tests; | |
use GuzzleHttp\Client; | |
use Tests\TestCase; | |
/** | |
* Any Test | |
* |
#!/usr/bin/env bash | |
l=$(wmctrl -l | grep -i -o "0[xX][0-9a-z]*") | |
for i in $(echo $l); do | |
wmctrl -i -r $i -b toggle,maximized_horz,maximized_vert | |
done | |
for i in $(echo $l); do | |
wmctrl -i -r $i -b toggle,maximized_horz,maximized_vert |
<?php | |
$publicKeyString = "-----BEGIN PUBLIC KEY----- | |
-----END PUBLIC KEY-----"; | |
$privateKeyString = "-----BEGIN RSA PRIVATE KEY----- | |
-----END RSA PRIVATE KEY-----"; | |
$publicKey = openssl_pkey_get_public($publicKeyString); |
gateways: | |
istio-ingressgateway: | |
serviceAnnotations: | |
"service.beta.kubernetes.io/aws-load-balancer-internal": "0.0.0.0/0" |
<?php | |
require('polyfill.php'); | |
$array = ['a', 'A', 'A', 'A', 'a', 't']; | |
var_dump( | |
array_element_exists('a', $array), | |
array_element_exists('x', $array) | |
); |