Skip to content

Instantly share code, notes, and snippets.

View kevinburke's full-sized avatar

Kevin Burke kevinburke

View GitHub Profile
@kevinburke
kevinburke / download_ngrok.sh
Last active August 28, 2025 03:31
Download ngrok
# Copy this at the command line
curl --silent https://gist.github.com/kevinburke/8552403/raw/b59963715b506234bf040bd394fa02b067100e3d/ngrok.bash -o /tmp/ngrok.bash && bash /tmp/ngrok.bash
@kevinburke
kevinburke / hello.py
Created August 26, 2014 21:29
flask dummy app
from flask import Flask, request
app = Flask(__name__)
@app.route("/")
def hello():
print request.headers
return "Hello World!"
if __name__ == "__main__":
app.run()
70 earned: 2019-02-07 spent: 2019-04-18 $25.00 Cash Exxon Mobil
71 earned: 2019-02-07 spent: 2019-04-19 $3.00 Cash Shaska Cafe
71 earned: 2019-02-07 spent: 2019-04-19 $2.00 Cash Shaska Cafe
72 earned: 2019-02-07 spent: 2019-04-20 $4.00 Cash Aces
75 earned: 2019-02-07 spent: 2019-04-23 $6.00 Cash Corner Store
75 earned: 2019-02-07 spent: 2019-04-23 $3.00 Cash Lava Java
76 earned: 2019-02-07 spent: 2019-04-24 $123.45 Shared Checking Transfer : Credit Card 1
76 earned: 2019-02-07 spent: 2019-04-24 $456.78 Shared Checking Transfer : Credit Card 2
77 earned: 2019-02-07 spent: 2019-04-25 $3.00 Cash Lava Java
77 earned: 2019-02-07 spent: 2019-04-25 $2.00 Cash Corner Store
@kevinburke
kevinburke / results.txt
Last active July 28, 2022 02:33
Performance of ''.join vs .format() in Python
$ python test_time.py
join_test: 21.3 seconds
format_test: 36.6 seconds
@kevinburke
kevinburke / curl.jinja
Last active April 28, 2022 23:38
Turn a requests request back into (roughly) the HTTP request that went over the wire. Also translates the request into a curl command
curl -X{{ method }} {{ url }}
{%- if query_string|length %}?{% endif %}
{{- query_string }} \
{%- for header, value in headers.iteritems() %}
-H '{{ header|urlencode }}: {{ value|urlencode }}'{% if not loop.last or params|length or auth %} \{% endif %}
{%- endfor -%}
{% if params|length %}{% for param, value in params.iteritems() %}
-d '{{ param.decode('utf-8')|urlencode }}={{ value.decode('utf-8')|urlencode }}'{% if not loop.last or auth %} \{% endif %}
{%- endfor %}{%- endif %}
{%- if auth %}

Goal

Bring Jenkins UI into the current decade

What are the problems?

From a design standpoint:

  • Text is too small. A build server is frustrating enough without having to squint at the screen to read.
@kevinburke
kevinburke / haproxy.config
Created October 10, 2013 17:34
twilio haproxy config
# Twilio HTTP HAProxy Configuration
# Version: 0.1
global
daemon
log 127.0.0.1 local0 info
maxconn 60000
spread-checks 3
Getting direct dependencies...
Checked 9 directories for packages.
Found 3 direct dependencies.
Root project is "github.com/ovnworks/ovs_exporter"
2 transitively valid internal packages
4 external packages imported from 3 projects
(0) ✓ select (root)
(1) ? attempt github.com/greenpau/ovsdb with 1 pkgs; 1 versions to try
(1) try github.com/greenpau/ovsdb@master
(1) ✓ select github.com/greenpau/ovsdb@master w/1 pkgs

When Windy Hill Property Ventures started working on an apartment proposal in Belmont, the developer originally proposed 175 homes.

After some discussion with city staff, Palo Alto-based Windy Hill re-submitted its proposal at 250 homes — the largest housing development in Belmont in decades.

        <!--Ad Tag - c1 (xs/xm/md)-->
        <aside class="inset inset--major hidden--print hidden--lg hidden--xl" v-if="$viewport.isMobile">
            <div class="xs-only__expander sm-only__expander ">
                <div class="ad-container ad-container--in-inset">
                    <gpt

position="c1"

Get:5 http://http.us.debian.org jessie-backports/main amd64 Packages [1172 kB]
Err http://deb.debian.org jessie/main amd64 Packages
404 Not Found
Err http://deb.debian.org jessie-updates/main amd64 Packages
404 Not Found
Fetched 3116 kB in 4s (716 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found