Skip to content

Instantly share code, notes, and snippets.

@andr0id1
andr0id1 / replace.ts
Created September 27, 2021 12:55
[rename camel case to sentence ] Adds spaces and makes words in sentence lowercase #Javascript #Typescript
"ThisIsATest".replace(/^[a-z]|[A-Z]/g, (v, i) =>
i === 0 ? v.toUpperCase() : ` ${v.toLowerCase()}`
)
@andr0id1
andr0id1 / deleteBiberCache.sh
Created July 3, 2021 18:28
[delete Biber Cache] Delete Biber Cache if Biber is bugging around again #latex #biber #macOS
rm -rf `biber --cache`
@andr0id1
andr0id1 / horizontalCenter.css
Created October 23, 2020 17:10
[css horizontal center] how to center conten hoizontal #css #bootstrap
Horizontal center:
text-center to center display:inline elements & column content
mx-auto for centering inside flex elements
offset-* or mx-auto can be used to center columns (.col-)
justify-content-center to center columns (col-*) inside row
@andr0id1
andr0id1 / minimal-ingress.yaml
Created October 15, 2020 11:31
[kubernetes ingress] different ingress charts #kubectl #kubernetes #nginx #ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http: # ohne "host: " geht einfach alles an die eine Rule
paths:
@andr0id1
andr0id1 / gitCredentials.sh
Last active August 3, 2020 13:47
[git new password] Befehlt, durch den man Credentials neu eingeben kann. #git
#A username and password prompt will appear with your next Git action (pull, clone, push, etc.).
# mac
git config --global credential.helper osxkeychain
#windows
git config --global credential.helper wincred
@andr0id1
andr0id1 / gitSSL.sh
Created July 16, 2020 20:32
[git ssl verify] Use Windows SChannel with git #git
git config --global http.sslBackend schannel
#Once you have configured this, Git will use the Windows certificate store and should not require (and, in fact, should ignore) the http.sslCAInfo configuration setting.
#Beginning with Git for Windows 2.14, you can now configure Git to use SChannel, the built-in Windows networking layer. This means that it will use the Windows certificate storage mechanism and you do not need to explicitly configure the curl CA storage mechanism.
#It is now possible to switch between Secure Channel and OpenSSL for Git's HTTPS transport by setting the http.sslBackend config variable to "openssl" or "schannel"; This is now also the method used by the installer (rather than copying libcurl-4.dll files around).
@andr0id1
andr0id1 / state-updates-are-async.md
Created July 16, 2020 20:09 — forked from bpas247/state-updates-are-async.md
State Updates Are Asynchronous

State Updates Are Asynchronous

The gist of it

You do this.

const handleEvent = e => {
  setState(e.target.value);
  console.log(state);
}
@andr0id1
andr0id1 / sampleREADME.md
Last active August 9, 2020 13:31 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects. #readme #git

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@andr0id1
andr0id1 / Dashboard.sh
Last active July 16, 2020 19:56
[Azure Kubernetes Dashboard] Azure Kubernetes Dashboard öffnen #azure #kubernetes
az aks browse --resource-group <Resource Group Name> --name <Cluster Name>
#kube-dashboard muss im cluster installiert sein
@andr0id1
andr0id1 / select kubectl cluster.sh
Last active July 17, 2020 12:14
[azure kubernetes cluster wechseln] Das Kubernetes Cluster wechseln #azure #kubernetes
az aks get-credentials --resource-group <myResourceGroup name> --name <Cluster Name>