Skip to content

Instantly share code, notes, and snippets.

View vdvm's full-sized avatar

Attila van der Velde vdvm

View GitHub Profile
@vdvm
vdvm / httpserver.go
Created June 30, 2014 08:34
Simple HTTP server in Go
package main
import (
"log"
"net/http"
"os"
)
func main() {
cwd, _ := os.Getwd()
@vdvm
vdvm / sublime-settings.json
Created May 1, 2014 14:00
Sublime settings
{
"translate_tabs_to_spaces": true,
"indent_to_bracket": true,
"highlight_line": true,
"trim_trailing_white_space_on_save": true,
"ensure_newline_at_eof_on_save": true
}
@vdvm
vdvm / auroraobjects-laravel.md
Created April 22, 2014 13:04
Using AuroraObjects with Laravel 4
https://github.com/aws/aws-sdk-php-laravel
https://github.com/aws/aws-sdk-php

composer.json:

{
 "require": {
@vdvm
vdvm / srt2vtt.sh
Created April 15, 2014 14:31
Convert .srt to .vtt
#!/bin/bash
echo "WEBVTT"
echo ""
sed '/[0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9] --> [0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]/s/,/./g' $1
<?php
return array(
'includes' => array('_aws'),
'services' => array(
'default_settings' => array(
'params' => array(
'key' => 'KEY',
'secret' => 'SECRET',
'base_url' => 'http://o.auroraobjects.eu'
@vdvm
vdvm / gist:4665450
Last active December 13, 2023 23:29
Recursive array str_replace
<?php
function recursive_array_replace($find, $replace, $array) {
if (!is_array($array)) {
return str_replace($find, $replace, $array);
}
$newArray = array();