Skip to content

Instantly share code, notes, and snippets.

@leandroxk
leandroxk / tekton-cleanup.yaml
Created March 21, 2023 16:51 — forked from ctron/tekton-cleanup.yaml
Cleaning up Tekton pipeline runs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleaner
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cleaner

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@leandroxk
leandroxk / README.md
Created August 15, 2018 14:05 — forked from jgoodall/README.md
This is a sample of how to send some information to logstash via the TCP input from node.js or python.

This is a sample of how to send some information to logstash via the TCP input in nodejs or python. It assumes the logstash host is on 10.10.10.100 and the TCP listening input is 9563.

The logstash.conf should look something like the sample file.

The log message should be a stringified JSON object with the log message in the @message field.

To use, run the node script node sendMessageToLogstash.js, or the python script python sendMessageToLogstash.js

@leandroxk
leandroxk / check_intermedium_private_key_leak.sh
Created May 11, 2018 17:19 — forked from guilhermednt/check_intermedium_private_key_leak.sh
Verifying Banco Intermedium's private key leak
# Today the twitter user @ayubio said he had received the private key for a Brazillian bank's HTTPS certificate:
# - https://twitter.com/ayubio/status/994260981294469120
# - https://twitter.com/ayubio/status/994262029929246722
# - https://twitter.com/ayubio/status/994277992351391744
# To prove he actualy had the key, another user asked him to sign a message with such key and so he did:
# - http://pastebin.xyz/p?q=bXllODA
# The commands bellow will check that signature
# Store the message in a file (tweet.txt) in the same way @ayubio did:
@leandroxk
leandroxk / init.gradle
Created August 9, 2017 13:25 — forked from mosabua/init.gradle
init.gradle file for proxying all repositories with Sonatype Nexus
/**
* init.gradle file for development using Nexus as proxy repository
*
* @author Manfred Moser <manfred@simpligility.com
*/
apply plugin:NexusRepositoryPlugin
class NexusRepositoryPlugin implements Plugin<Gradle> {
import static org.junit.Assert.assertEquals;
import java.text.Normalizer;
import org.junit.Test;
public class TextNormalizerTest {
@Test
public void happyDay() {
String text = "áàÁÀä_çãõé_a-b)c(de/f@gºh'i*jkl_1234567890\\\\";
@leandroxk
leandroxk / compassbearing.py
Created November 6, 2016 11:44 — forked from jeromer/compassbearing.py
compass bearing between two points in Python
def calculate_initial_compass_bearing(pointA, pointB):
"""
Calculates the bearing between two points.
The formulae used is the following:
θ = atan2(sin(Δlong).cos(lat2),
cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong))
:Parameters:
- `pointA: The tuple representing the latitude/longitude for the
@leandroxk
leandroxk / faking_location.py
Created November 3, 2016 20:10 — forked from sqe/faking_location.py
Faking geolocation in Chrome with javascript for @RubyTester
# Solution found @ http://stackoverflow.com/a/31803008:
from selenium import webdriver
import requests
driver = webdriver.Chrome()
fake_lat = "37.773972"
fake_long = "-122.431297"
@leandroxk
leandroxk / boto3_hands_on.md
Created July 22, 2016 20:29 — forked from iMilnb/boto3_hands_on.md
Programmatically manipulate AWS resources with boto3 - a quick hands on

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
@leandroxk
leandroxk / styles.less
Created July 22, 2016 13:33 — forked from brandondurham/styles.less
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):