Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jsorah
jsorah / Dockerfile
Last active July 10, 2016 00:06
Bugzilla 5 Dockerfile... FML
FROM centos:centos6.6
RUN yum update -y
RUN yum install -y mysql-server wget httpd perl5 tar
# Perl specific stuff.
RUN yum install -y gcc perl-parent perl-CPAN
RUN useradd -ms /bin/bash bugzilla
RUN usermod -a -G apache bugzilla
USER bugzilla
WORKDIR /home/bugzilla
RUN wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.3.tar.gz
@jsorah
jsorah / gtk.css
Created February 4, 2018 04:06
Thing to make gnome3 toolbars not stupid
/* shrink headerbars */
headerbar {
min-height: 0px;
padding-left: 2px;
/* same as childrens vertical margins for nicer proportions */
padding-right: 2px;
/* background-color: #2d2d2d; */
}
@jsorah
jsorah / SAMLServlet.java
Created March 9, 2018 13:19 — forked from jimhe/SAMLServlet.java
Servlet to handle SAML Auth request and response. on GET /saml, it will redirect to the ID Provider with the proper SAMLRequest parameter. on POST /saml, it will parse the POST parameter for a properly signed and successful response before allowing the user in.
package com.comprehend.servlet;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.opensaml.Configuration;
import org.opensaml.common.binding.BasicSAMLMessageContext;
import org.opensaml.common.xml.SAMLConstants;
import org.opensaml.saml2.binding.decoding.HTTPPostDecoder;
import org.opensaml.saml2.binding.encoding.HTTPRedirectDeflateEncoder;
import org.opensaml.saml2.core.*;
@jsorah
jsorah / Dockerfile
Created April 16, 2019 02:43
WILDFLY WOO
FROM jboss/wildfly:14.0.1.Final
RUN /opt/jboss/wildfly/bin/add-user.sh admin admin --silent
ADD commands.cli /run/
ADD execute.sh /run/
RUN /run/execute.sh
ADD wmq.jmsra.rar /opt/jboss/wildfly/standalone/deployments/
@jsorah
jsorah / go.sh
Created November 2, 2021 01:51
need to find that thing from that web response json
jq -c '.[] | select((.arr[]?.name // "") | contains("want"))'
@jsorah
jsorah / empty_frame.py
Created September 2, 2022 20:16
Sends an empty frame as end stream marker for h2 request
#!/usr/bin/env python3
"""
empty_frame.py
~~~~~~~~~~~~~~~~~~~~~~~
Just enough code to send a GET request via h2 to an HTTP/2 server and receive a response body.
This is *not* a complete production-ready HTTP/2 client!
Borrowed from https://python-hyper.org/projects/hyper-h2/en/stable/plain-sockets-example.html with modifications.