Skip to content

Instantly share code, notes, and snippets.

View sskylar's full-sized avatar
lgtm

Skylar SC sskylar

lgtm
View GitHub Profile
@tristanlins
tristanlins / iconv.docker
Created October 10, 2015 15:41
Docker PHP extension recipes
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv \
&& apt-get remove -y \
libfreetype6-dev \
&& apt-get install -y \
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@primeobsession
primeobsession / gist:f9d30c5ebc8b0486de14
Last active June 4, 2022 00:40
Install latest version of ImageMagick on Amazon Beanstalk
# Check if this is the very first time that this script is running
if ([ ! -f /root/.not-a-new-instance.txt ]) then
newEC2Instance=true
fi
if ([ $newEC2Instance ]) then
whoami
cd /tmp
@sskylar
sskylar / iam_single_bucket.json
Last active July 30, 2020 16:00
Siteleaf IAM policy for single bucket (most restrictive)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowHostingDropdown",
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
@supinf
supinf / s3-invalidation.js
Last active January 7, 2023 08:57
AWS Lambda script:: CloudFront Invalidations which are triggered by s3 events.
console.log('Loading event');
var Q = require('q');
var aws = require('aws-sdk');
var cloudfront = new aws.CloudFront();
exports.handler = function (event, context) {
//_log('Received event: ', event);
var bucket = event.Records[0].s3.bucket.name;
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@todgru
todgru / aws-ec2-redis-cli.md
Created June 12, 2014 23:01
AWS redis-cli on EC2
@vinceallenvince
vinceallenvince / README.md
Last active April 8, 2017 08:55
Setup a Siteleaf site with a corresponding Gmail account on DigitalOcean

Setup Siteleaf site and Gmail on DigitalOcean

I recently setup a Siteleaf site and corresponding Gmail account via DigitalOcean. It occured to me these steps may be useful to people looking to do the same.

If you've already created your Droplet, installed vsftpd and apache, skip to step 4.

DO - do this step on Digital Ocean
SL - do this step on Siteleaf
GA - do this step on Google Apps for Business
REG - do this at your domain's registrar

@aurman
aurman / enpointExample.groovy
Created March 27, 2014 17:33
SmartThings API Endpoint Example
/**
* App Endpoint API Access Example
*
* Author: SmartThings
*/
preferences {
section("Allow Endpoint to Control These Things...") {
input "switches", "capability.switch", title: "Which Switches?", multiple: true
input "locks", "capability.lock", title: "Which Locks?", multiple: true
@ARolek
ARolek / ImageMagick-Amazon-Linux.md
Last active February 10, 2023 00:07
Install ImageMagick from source on Amazon Linux

I needed a newer version of ImageMagick than is available on the yum packages on Amazon Linux. I tried using the remi repo but it failed with dependency errors. Here is what I did to install ImageMagick with support for PNG, JPG, and TIFF.

download the most recent package

wget http://www.imagemagick.org/download/ImageMagick.tar.gz

uncomress the package