Skip to content

Instantly share code, notes, and snippets.

@vanroy86
vanroy86 / convert.sh
Created January 6, 2021 04:54 — forked from bittercoder/convert.sh
Convert .heic files to .jpg on linux (coming from an iOS11 device over USB)
# download release from github: https://github.com/monostream/tifig/releases and install at ~/tools/tifig
# then run these commands in the folder (just to keep things simple we normalize the file extension case before proceeding).
for f in *.HEIC; do mv "$f" "`echo $f | sed s/.HEIC/.heic/`"; done
for file in *.heic; do echo "~/tools/tifig -v -p $file ${file/%.heic/.jpg}"; done
@vanroy86
vanroy86 / requestUnicorn.js
Created July 31, 2019 10:17 — forked from connor11528/requestUnicorn.js
Lambda function for requesting a Unicorn to come pick us up. Part of the WildRydes AWS application
randomBytes = require('crypto').randomBytes;
const AWS = require('aws-sdk');
const ddb = new AWS.DynamoDB.DocumentClient();
const fleet = [
{
Name: 'Bucephalus',
Color: 'Golden',
@vanroy86
vanroy86 / icecast-downloadxml.sh
Created June 28, 2019 17:35 — forked from anthonyeden/icecast-downloadxml.sh
Icecast: Pull Configuration from S3
#!/bin/sh
# This script downloads your Icecast XML script from AWS S3, compares it for changes, and reloads Icecast if changes have been found
# Written by Anthony Eden (http://mediarealm.com.au/)
file="icecast.xml"
bucket="BUCKET-NAME-GOES-HERE"
s3Key="KEY-GOES-HERE"
s3Secret="SECRET-GOES-HERE"
@vanroy86
vanroy86 / gist:4d52db28de2bb9b366ca4218ca9148be
Created June 28, 2019 11:02 — forked from tobek/get-image-urls.js
Save images from chrome inspector network tab
/* right click on an entry in the network log, select Copy All as Har
* type in console: x = [paste]
* paste the following JS code into the console
* copy the output, paste into a file
* then wget -i [that file]
*/
(function(logObj, mime) {
var results = [];
logObj.log.entries.forEach(function (entry) {
if (mime && entry.response.content.mimeType !== mime) return;
@vanroy86
vanroy86 / slackpost.sh
Created June 22, 2019 18:21 — forked from elnygren/slackpost.sh
Post to Slack webhook with curl & jq
#!/usr/bin/env bash
# CONFIG
URL="https://hooks.slack.com/services/..."
PAYLOAD='{
"channel": "#test",
"username": "Ghost",
"text": "no-message",
"icon_emoji": ":ghost:"
}'
@vanroy86
vanroy86 / slack_webhook_post.py
Created June 22, 2019 17:22 — forked from devStepsize/slack_webhook_post.py
POST a JSON payload to a Slack Incoming Webhook using Python requests
'''
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
https://api.slack.com/incoming-webhooks
'''
import json
import requests
@vanroy86
vanroy86 / README.md
Created April 1, 2019 11:26 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@vanroy86
vanroy86 / bootstrap3-input-file.html
Created April 1, 2019 09:56 — forked from znz/bootstrap3-input-file.html
bootstrap3 input file test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bootstrap3のinput[file]のテスト</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>
<body>
@vanroy86
vanroy86 / Dockerfile
Created April 1, 2019 09:56 — forked from znz/Dockerfile
ruby 2.1.2 with libressl
FROM ubuntu:14.04
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install wget autoconf bison build-essential libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
RUN cd /usr/local/src && wget -N http://ftp.jaist.ac.jp/pub/OpenBSD/LibreSSL/libressl-2.0.3.tar.gz && tar xvf libressl-2.0.3.tar.gz
RUN cd /usr/local/src/libressl-2.0.3 && ./configure && make check && make install
RUN /sbin/ldconfig
RUN cd /usr/local/src && wget -N http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz && tar xvf ruby-2.1.2.tar.gz
RUN cd /usr/local/src/ruby-2.1.2 && ./configure --disable-install-doc && make install
@vanroy86
vanroy86 / gist:17777ce069f655cb76e194a2552f14fa
Created March 14, 2019 10:44
/etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com