Skip to content

Instantly share code, notes, and snippets.

View webdevotion's full-sized avatar

Bram Plessers webdevotion

View GitHub Profile
@webdevotion
webdevotion / async-api-2-0-0.yaml
Last active March 8, 2022 09:29
async-api-examples
asyncapi: 2.0.0
info:
title: Account Service
version: '1.0.0'
description: |
Manages user accounts in the system.
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
@webdevotion
webdevotion / yml
Created September 23, 2021 13:52
hello-world-async-api
asyncapi: 2.1.0
info:
title: Hello world application
version: '0.1.0'
channels:
hello:
publish:
message:
payload:
type: string
@webdevotion
webdevotion / pixelmator-pro-layers-in-folders-export-to-images.scpt
Last active July 13, 2021 09:44
Applescript for Pixelmator Pro documents to export all layers in nested folders as images files.
on list2string(theList, theDelimiter)
-- First, we store in a variable the current delimiter to restore it later
set theBackup to AppleScript's text item delimiters
-- Set the new delimiter
set AppleScript's text item delimiters to theDelimiter
-- Perform the conversion
set theString to theList as string
@webdevotion
webdevotion / .bash_profile
Last active December 21, 2020 10:17
Fancy bash shell
# READ MORE HERE: http://www.webdevotion.be/blog/2012/06/06/terminal-git-branch-status-colored-icons
# ==============================================================================
# FANCY GIT STATUS ICONS
# ==============================================================================
# SOME VARIABLES in capitals
# no whitespace between variable names and = sign!
COLOR_RESET="\e[00m"
COLOR_GREEN="\e[1;32m"
COLOR_RED="\e[00;31m"
@webdevotion
webdevotion / vimeo.rake
Created May 23, 2013 12:39
The Vimeo API currently does not allow you to fetch the direct links for private Pro videos through their API. This `rake` task fetches the HTTP Live Streaming link so you can you `MPMoviePlayerController` in you iOS applications in stead of a webview.
namespace :vimeo do
desc "Get Vimeo HTTP Live Streaming link for private Pro videos"
task :direct => :environment do |t,args|
your_video_id = "66666666" # change this to your video id
loginURL = "https://vimeo.com/log_in"
videoFormAction = "/#{your_video_id}/settings/file"
@webdevotion
webdevotion / self-signed-localhost-for-rails.txt
Last active March 21, 2019 16:02 — forked from trcarden/gist:3295935
SSL self signed localhost for rails start to finish, no red warnings.
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@webdevotion
webdevotion / .block
Created May 4, 2017 13:24 — forked from mbostock/.block
Force-Directed Tree
license: gpl-3.0
height: 960
@webdevotion
webdevotion / bug-report.md
Created January 11, 2017 13:01
Bug / Crash Report

Story

Describe the happy user story

Problem

Describe the problem that turns it into a less than happy user story

Reproduce

Describe how to reproduce

Additional Resources

@webdevotion
webdevotion / symfony.bash
Created January 9, 2015 09:49
Fixing cache and logs permissions in Symfony application
# remove existing folders with unnecessary
ϟ sudo rm -rf app/cache/*
ϟ sudo rm -rf app/logs/*
# get the current apache user
ϟ HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
ϟ echo $HTTPDUSER
# chmod the folders with the apache user and your current CLI user
ϟ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
@webdevotion
webdevotion / inspector.html
Created September 26, 2013 07:32
JavaScript Example
<html>
<head>
<style>
body{
font-family: "Verdana";
}
div.row{
height:400px;