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 June 21, 2025 05:27 — 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 / 1. destructuring.md
Last active June 4, 2025 09:45 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet #clojure

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

@Integralist
Integralist / deferredImplems.md
Last active May 31, 2025 20:39 — forked from addyosmani/deferredImplems.md
Deferred implementations #js
@Integralist
Integralist / gist:1316940
Last active May 31, 2025 20:38 — forked from millermedeiros/gist:882682
RequireJS Async Load Plugin #js
/*!
* RequireJS plugin for async dependency load like JSONP and Google Maps
* @author Miller Medeiros
* @version 0.0.1 (2011/03/23)
* Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
define(function(){
function injectScript(src){
var s, t;
@Integralist
Integralist / backend_template.vcl
Last active May 26, 2025 16:57 — 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;
@Integralist
Integralist / GitHub curl.sh
Last active February 6, 2025 20:47 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@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 / ext.vim
Last active February 11, 2019 10:32 — forked from sjl/ext.vim
Some basic examples of executing external commands within Vim's COMMAND-LINE mode
" run command
" no stdin
" output displayed in "Press enter to continue" style
" current buffer untouched
:!uptime
" run command
" pipe range of text to command on stdin
" output replaces the range in the current buffer
:RANGE!grep foo
# 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 / inherit-by-proxy.js
Last active December 20, 2015 01:09 — forked from jeremyckahn/inherit-by-proxy.js
JavaScript: inheritance by proxy
function inherit (child, parent) {
function proxy () {};
proxy.prototype = parent.prototype;
child.prototype = new proxy();
};
function Parent () {}
function Child () {}
inherit(Child, Parent);