Skip to content

Instantly share code, notes, and snippets.

View paflopes's full-sized avatar

Phillipe Lopes paflopes

View GitHub Profile
module.exports = {
env: {
commonjs: true,
es6: true,
node: true,
mongo: true,
mocha: true
},
extends: [
'airbnb-base',
package com.bideafactory.wom.usageconsuption.converter;
import org.bson.Document;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.ReadingConverter;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import javax.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
import java.util.LinkedHashMap;
@paflopes
paflopes / template.yaml
Created February 7, 2019 15:28 — forked from vsomayaji/template.yaml
Using a CFN custom resource to generate a random password
Resources:
PasswordGeneratorLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub /aws/lambda/${AWS::StackName}-PasswordGenerator
RetentionInDays: 1
PasswordGeneratorRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:

Keybase proof

I hereby claim:

  • I am paflopes on github.
  • I am paflopes (https://keybase.io/paflopes) on keybase.
  • I have a public key ASASnagZ6iB8jH9zrBRJD61_vuMRvUUYUqybSqmhr8u0dAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@paflopes
paflopes / totem.thumbnailer
Created April 7, 2017 01:26
file /usr/share/thumbnailers/totem.thumbnailer
[Thumbnailer Entry]
TryExec=/usr/bin/ffmpegthumbnailer
Exec=/usr/bin/ffmpegthumbnailer -s %s -i %i -o %o -c png -f
MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/vnd.apple.mpegurl;application/vnd.ms-asf;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gp;video/3gpp;video/3gpp2;video/dv;video/divx;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/mpeg-system;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.mpegurl;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-mpeg2;video/x-ms-asf;vi
@paflopes
paflopes / README.md
Created March 21, 2017 19:49 — forked from adambom/README.md
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
#!/bin/bash
# remove the branches remotely
git branch --merged | egrep -v "(^\*|master|demo|preprod|production)" | xargs -n 1 git push --delete origin
# remove the branches locally with
# git branch --merged | egrep -v "(^\*|master|demo|preprod|production)" | xargs -n 1 git branch -d
((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src', '//uneddit.com/phase_one');document.body.appendChild(e)})());
@paflopes
paflopes / myip
Created October 22, 2016 18:35
Small script to get external ip
#!/bin/bash
dig +short myip.opendns.com @resolver1.opendns.com