Skip to content

Instantly share code, notes, and snippets.

View ianhobbs's full-sized avatar

ian hobbs ianhobbs

View GitHub Profile
@devotox
devotox / s3-optimize-images.js
Last active January 21, 2021 00:09
Run Through S3 Images (JPEG) and optimize them using imagemin and reupload to same path - Automatically sets the cache control to a day and public
#!/usr/bin/node
const fs = require('fs');
const path = require('path');
const AWS = require('aws-sdk');
const Promise = require('bluebird');
const imagemin = require('imagemin');
const imageminJpegRecompress = require('imagemin-jpeg-recompress');
const config = {
@akella
akella / setup.md
Last active February 21, 2023 22:59
Мой сетап

То что я использую в работе и стримах

Софт для разработки

@scottgruber
scottgruber / data.json
Last active March 7, 2019 10:24
PHP script to import a JSON data source into a Perch Runway content collection
{
"data": [
{
"id": 14832,
"Title": "First story title",
"Content": "postBody. Long body of markdown or html removed for this example",
"Date": "2017-01-13",
"Permalink": "first-story-title",
"author_given_name": "Scott",
"author_family_name": "Gruber"
@scottgruber
scottgruber / block_template.html
Last active July 27, 2023 14:32
Using perch:related in a block proof of concept.
<perch:block type="related_article_block" label="Related Articles">
<perch:template path="content/blocks/related_article_block.html" />
</perch:block>
@seebz
seebz / iCal.php
Last active February 21, 2024 13:03
iCal PHP Parser
<?php
class iCal
{
/**
* @var string
*/
public $title;
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@jakebellacera
jakebellacera / ICS.php
Last active April 19, 2024 09:06
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*