Skip to content

Instantly share code, notes, and snippets.

View DASPRiD's full-sized avatar

Ben Scholzen DASPRiD

View GitHub Profile
#!/bin/bash
# Timelapse script by Ben Scholzen 'DASPRiD'
# Licensed under the Simplified BSD License
# http://opensource.org/licenses/BSD-2-Clause
FFPROBE=/usr/bin/ffprobe
FFMPEG=/usr/bin/ffmpeg
SOXI=/usr/bin/soxi
SPLASH_LENGTH=5
@DASPRiD
DASPRiD / text.php
Last active August 29, 2015 13:59 — forked from bakura10/text.php
<?php
$routes = [];
if ($_SERVER['ENV'] === 'production') {
$options = ['hostname' => 'connect.mysite.com', 'secure' => true];
} else {
$options = ['hostname' => 'connect.localhost.com'];
}

Keybase proof

I hereby claim:

  • I am dasprid on github.
  • I am dasprid (https://keybase.io/dasprid) on keybase.
  • I have a public key whose fingerprint is D9C9 EBCB 95D3 1CB5 BBE4 08F0 970E 1463 AFB4 67FB

To claim this, I am signing this object:

@DASPRiD
DASPRiD / gist:f069cfba9cd223726280
Created October 7, 2014 18:00
MPD script for HexChat
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import hexchat
__module_name__ = "MPD Status"
__module_version__ = "0.0.1"
__module_description__ = "Sends MPD status"
<?php
$intVector = Vector<int>(53, 32, 43);
$stringVector = Vector<string>('foo', 'bar', 'baz');
$arrayVector = Vector<array>(array('a'), array('b'));
$vectorVector = Vector<Vector<int>>(Vector<int>(1, 2), Vector<int>(2, 3));
$classVector = Vector<\stdClass>(new \stdClass(), new \stdClass());
foreach ($intVector as $key => $value) {
// Do something.
}
#!/bin/bash
if [ -z "$1" ]
then
echo "No input file supplied"
fi
convert $1 \
-trim -resize 512x512 \
\( -clone 0 -background white -shadow 100x2+0+0 -channel A -level 0,5% +channel \) \
<?php
$config['routes'] = array(
'blog' => array(
'type' => 'Literal',
'options' => array(
'route' => '/blog',
'defaults' => array(
'controller' => 'blog-entry',
),
),
<?php
class CssCompiler
{
protected $gradients;
public function compile($input, $output, $gradients)
{
$this->gradients = $gradients;
$content = file_get_contents($input);
dasprid@dasprid-desktop:~/dev/flitch (master)$ ./flitch ../zf2/library/
Flitch 0.1.0dev by Ben Scholzen.
../zf2/library/Zend/Soap/Client/DotNet.php:
--------------------------------------------------------------------------------
75:error: Line may not be longer than 120 characters
../zf2/library/Zend/Soap/Client.php:
--------------------------------------------------------------------------------
340:error: Line may not be longer than 120 characters
<?php
switch ($foo) {
case 'a':
$bar = 'a';
case 'b':
case 'c':
$foo = 'a';
break;
case 'd':