Skip to content

Instantly share code, notes, and snippets.

View raulsperoni's full-sized avatar

raúl raulsperoni

View GitHub Profile
@raulsperoni
raulsperoni / kubectl describe nodes
Created February 10, 2022 20:33
node status inmediatly after por dying
kubectl describe nodes ip-10-4-123-95.us-west-2.compute.internal
E0209 11:35:15.039890 278909 describe.go:2645] Unable to construct reference to '&core.Node{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"ip-10-4-123-95.us-west-2.compute.internal", GenerateName:"", Namespace:"", SelfLink:"", UID:"89045b50-39ef-4b62-b32d-4f15e521406e", ResourceVersion:"17209", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63780013218, loc:(*time.Location)(0x49403c0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"beta.kubernetes.io/os":"linux", "kubernetes.io/arch":"amd64", "kubernetes.io/hostname":"ip-10-4-123-95.us-west-2.compute.internal", "eks.amazonaws.com/nodegroup":"eks-small", "eks.amazonaws.com/nodegroup-image":"ami-0fe74570d87750175", "node.kubernetes.io/exclude-from-external-load-balancers":"true", "beta.kubernetes.io/arch":"amd64", "kubernetes.io/os":"linux", "topology.kubernetes.io/region":"us-west-2", "t
@raulsperoni
raulsperoni / wordpress.yml
Created February 19, 2018 13:35
Wordpress, Cloudstor, Swarm, Traefik
version: '3.3'
services:
blog_wordpress:
image: wordpress
networks:
- traefik_proxy
secrets:
- mysql_host
@raulsperoni
raulsperoni / traefik.yml
Created February 16, 2018 17:59
Traefik configuration
version: "3.3"
services:
traefik:
image: traefik
command:
- "--api"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entrypoints=Name:https Address::443 TLS"
- "--defaultentrypoints=http,https"
docker network create --subnet 172.0.0.0/8 reserved-172-0-0-0-8
route del -net 172.0.0.0 gw 0.0.0.0 netmask 255.0.0.0
web:
image: wordpress
links:
- mysql
environment:
- WORDPRESS_DB_PASSWORD=myPass
working_dir: /var/www/html
volumes_from:
- data
ports:
@raulsperoni
raulsperoni / postgres-cheatsheet.md
Created February 18, 2016 20:01 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

@raulsperoni
raulsperoni / GitVolverPushed
Created July 22, 2015 13:39
Git, volver a un commit después de hacer push.
# Check that "git status" is clean, since the steps that follow will throw
# way uncommitted changes:
git status
# Set the index (staging area) to be as it was at professional-1.1.2:
git read-tree professional-1.1.2
# Create a commit based on that index:
git commit -m "Reverting to the state at professional-1.1.2"
public abstract class AbstractDao<K, E> {
public abstract EntityManager getEm();
public abstract Class<E> getDaoClass();
public AbstractDao() {
}
public E find(K id) {
@raulsperoni
raulsperoni / gitIgnore
Created June 5, 2015 13:41
Git ignore alredy commited files
git rm --cached fileToIgnore
git rm -r --cached folderToIgnore
@raulsperoni
raulsperoni / gitInit
Last active August 29, 2015 14:22
Git init non empty folder.
cd <localdir>
git init
git add .
git commit -m 'message'
git remote add origin <url>
git push -u origin master