Skip to content

Instantly share code, notes, and snippets.

@ctron
ctron / tekton-cleanup.yaml
Last active August 30, 2024 15:29
Cleaning up Tekton pipeline runs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleaner
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cleaner
@rxwx
rxwx / pulseversion.py
Created August 13, 2019 09:04
Pulse Secure Version Scanner
import requests
import sys
import re
HEADERS = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"}
if len(sys.argv) != 2:
print " Usage: python pulseversion.py <target ip/domain>"
sys.exit(1)
@S4lt5
S4lt5 / index.html
Last active December 28, 2015 10:29
jQuery XML visualization -- display block representation of XML string.
<html>
<head>
<style>
#treeView li {
background-color:lightgray;
text-align: left;
width:7em;
list-style: none;
border: 1px outset gray;
margin-bottom: 2px;
@timmyomahony
timmyomahony / extra_cms_tags.py
Last active March 5, 2019 12:33
A template tag for `django-cms` that allows a placeholder to be rendered and placed in a context variable so that the placeholder can be conditionally loaded. This code was originally submitted on the `django-cms` Google Group by Benoit Domingue: https://groups.google.com/forum/#!topic/django-cms/WDUjIpSc23c/discussion
from classytags.arguments import Argument, MultiValueArgument
from classytags.values import StringValue
from cms.templatetags.cms_tags import Placeholder, PlaceholderOptions
from cms.models.placeholdermodel import Placeholder as PlaceholderModel
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@hannahwhy
hannahwhy / convert.rb
Created November 24, 2012 23:16
PNG -> GeoTIFF conversion for Blue Marble PNGs
def trans_lat(lat)
lat =~ /([0-9]+)([NS])/
num, dir = $1.to_i, $2
dir == 'S' ? -num : num
end
def trans_long(long)
long =~ /([0-9]+)([EW])/