Original File name
1.mp4 2.mp4 3.mp4 4.mp4
title.txt
1-abc
2-def
3-ghi
Original File name
1.mp4 2.mp4 3.mp4 4.mp4
title.txt
1-abc
2-def
3-ghi
######################################################################### SERVER | |
resource "azuread_application" "server" { | |
name = "k8s_server" | |
reply_urls = ["http://k8s_server"] | |
type = "webapp/api" | |
# this is important, as stated by the documentation | |
group_membership_claims = "All" | |
required_resource_access { |
$ cd /etc/kubernetes/pki/ | |
$ mv {apiserver.crt,apiserver-etcd-client.key,apiserver-kubelet-client.crt,front-proxy-ca.crt,front-proxy-client.crt,front-proxy-client.key,front-proxy-ca.key,apiserver-kubelet-client.key,apiserver.key,apiserver-etcd-client.crt} ~/certs-bak | |
$ kubeadm init phase certs all | |
$ cd /etc/kubernetes/ | |
$ mv {admin.conf,controller-manager.conf,kubelet.conf,scheduler.conf} ~/certs-bak | |
$ kubeadm init phase kubeconfig all | |
$ reboot |
en: | |
questions: | |
new: 'New Question' | |
other: | |
recent: 'Recent' | |
old: 'Old' |
Translations: Korean (by Yongwoo Lee)
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
<?php | |
function Slug($string){ | |
return strtolower(trim(preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8')), '-')); | |
} | |
$user = 'Cómo hablar en sílabas'; | |
echo Slug($user); // como-hablar-en-silabas | |
$user = 'Álix Ãxel'; |
for ns in $(kubectl get ns --no-headers | awk '{print $1}'); | |
do for deploy in $(kubectl -n $ns get deploy --no-headers --ignore-not-found | awk '{print $1}'); | |
do kubectl -n $ns scale deploy $deploy --replicas=1; done; | |
done; |
<?php | |
namespace App\Filters; | |
use App\User; | |
class ThreadFilters extends Filters | |
{ | |
/** | |
* Registered filters to operate upon. |
class Errors { | |
/** | |
* Create a new Errors instance. | |
*/ | |
constructor() { | |
this.errors = {}; | |
} | |
/** |