Skip to content

Instantly share code, notes, and snippets.

View Integralist's full-sized avatar
🎯
Making an impact

Mark McDonnell Integralist

🎯
Making an impact
View GitHub Profile
@Integralist
Integralist / Makefile
Last active March 10, 2025 18:47 — forked from isaacs/Makefile
Example of a detailed Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@Integralist
Integralist / Godofile.go
Last active August 29, 2015 14:28
Godo re-build task
// It's important to realise that you'll only ever want to `go build` or `go run` a single file
// This confused me originally
// I could understand why my task's `Context` didn't get passed the name of the changed file
// The problem was I was just hacking little scripts together
// In practice, you'll be working within a project directory and you'll have a single entry point file
package main
import . "gopkg.in/godo.v1"
@Integralist
Integralist / Faraday SSL example.rb
Last active October 13, 2015 09:14 — forked from mislav/gist:938183
Faraday SSL example
connection = Faraday::Connection.new('http://example.com') do |builder|
builder.request :url_encoded # for POST/PUT params
builder.adapter :net_http
end
# same as above, short form:
connection = Faraday.new 'http://example.com'
# GET
connection.get '/posts'
# https://minhajuddin.com/2016/03/03/put-this-in-your-code-to-debug-anything
require 'rouge'
require 'method_source'
require 'pp'
class Dbg
def initialize(object, to:)
@object, @stream = object, to
end
@Integralist
Integralist / profile_ctx.py
Last active June 7, 2020 15:20 — forked from andriykohut/profile_ctx.py
[Python profiling context management] #python #profiling #performance
import cProfile
import contextlib
import io
import pstats
import sys
import timeit
@contextlib.contextmanager
def prof(*restrictions, stdout=True, dump=None, sortby='cumulative'):
@Integralist
Integralist / backend_template.vcl
Last active March 18, 2022 09:58 — forked from hrmsk66/backend_definition_via_loop.md
[Terraform create backend definitions from a list of hostnames] #terraform #fastly #work
backend F_${backendname} {
.between_bytes_timeout = 10s;
.connect_timeout = 1s;
.dynamic = true;
.first_byte_timeout = 15s;
.host = "${hostname}";
.max_connections = 200;
.port = "443";
.share_key = "...";
.ssl = true;