Skip to content

Instantly share code, notes, and snippets.

View johnmichel's full-sized avatar
👻
☕️

John Michel johnmichel

👻
☕️
View GitHub Profile
@marcoarment
marcoarment / S3.php
Last active June 25, 2023 19:41
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
#!/bin/bash
# This script will download the contents of a GitHub repo
# and place them in a local directory.
#
# Usage:
# download-repo.sh <repo> <output-path> <nested-path> <branch-name>
#
# Example:
# download-repo.sh wattenberger/kumiko ./kumiko-assets master public/assets
@RyanEager
RyanEager / van_down.py
Last active May 18, 2023 06:52
Scrape full sized images form vangoghmuseum.nl
"""
Scrape full sized images from vangoghmuseum.nl
---- requrires.txt ------------------------------------------------------------
beautifulsoup4==4.6.0
bs4==0.0.1
certifi==2018.4.16
chardet==3.0.4
idna==2.7
Pillow==5.2.0
python-slugify==1.2.5
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@avanslaars
avanslaars / styles.less
Last active April 5, 2017 19:44
Mix attributes from Operator Mono with Fira Code for ligatures
atom-text-editor {
/*font-family: "OperatorMono-Medium";*/
font-family: "Fira Code";
font-size: 18px;
font-weight: normal;
line-height: 1.7;
}
atom-panel.tool-panel {
font-size: 0.88em;
#!/bin/zsh
# Search for, select, and execute command from history DB using FZF
# Inspired by http://junegunn.kr/2015/04/browsing-chrome-history-with-fzf/
h(){
local sep query
sep='{::}'
query="SELECT cmd, count(*) as frequency
FROM hist
GROUP BY cmd
@bendc
bendc / supportsES6.js
Created August 25, 2016 08:05
Test if ES6 is ~fully supported
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
return false;
}
}();
@bendc
bendc / holy-grail.html
Last active December 15, 2017 19:50
Holy Grail Layout using CSS Grid
<!doctype html>
<title>Holy Grail Layout</title>
<style>
body {
display: grid;
grid-template-rows: 100px 1fr 100px;
grid-template-columns: 200px 1fr 200px;
min-height: 100vh;
margin: 0
@Avaq
Avaq / combinators.js
Last active June 11, 2024 12:46
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))