Skip to content

Instantly share code, notes, and snippets.

View tkjaergaard's full-sized avatar

Thomas Kjærgaard tkjaergaard

View GitHub Profile
@tkjaergaard
tkjaergaard / default
Last active March 16, 2020 05:59
default-nginx-config
server {
server_name _ {{domain}};
location / {
proxy_pass http://localhost:{{port}};
}
listen 80 default_server;
listen [::]:80 default_server;
}
@tkjaergaard
tkjaergaard / README.md
Last active December 31, 2015 17:49
stupid

Stupid Sprite Generator CLI

Installation

  • create a file in /usr/local/bin called "stupid" and add the content for "stupid" in this gist to the file. Alternatively you could do a wget.

  • Set the file to executable by chmod +x stupid

Now, the stupid command shoud be available anywhere.

@tkjaergaard
tkjaergaard / stupid.sh
Created December 18, 2013 13:46
CLI script to create sprites for the Stupid Studio jQuery-Sprite-Anim plugin.
#!/bin/bash
montage -tile 2x5 -mode concatenate -background transparent "images/*.*" sprite%05d.png
optipng -o5 *.png
@tkjaergaard
tkjaergaard / Vagrantfile
Last active December 31, 2015 09:19
Simple Vagrantfile for quick setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
@tkjaergaard
tkjaergaard / functions.php
Created December 3, 2013 11:55
Worpress slider using nav_menu
<?php
// [...]
if( !function_exists('get_thumb_url') )
{
function get_thumb_url($size='thumbnail',$id=null)
{
$id = ( $id ?: get_post()->ID );
@tkjaergaard
tkjaergaard / index.js
Created October 15, 2013 13:54
Fluent-ffmpeg test
var ffmpeg = require('fluent-ffmpeg'),
express = require('express');
var app = express();
app.get('/video/:filename', function(req, res) {
res.contentType('ogg');
var pathToMovie = 'video/' + req.params.filename; // be-s1e1.avi
html {
font-family: "Dejavu Sans Mono", "Monaco", monospace;
font-size: 9pt;
background-color: #2b2b2b;
color: #FFFFFF;
padding: 0;
margin: 0;
}
body {
# All colors must be in the form of '#rrggbb' or '#rgb'.
# You cannot use color names.
log-view:
nickname-format: '%n'
input-text:
font-family: 'Lucida Grande, Tahoma, Verdana, Arial, sans-serif'
font-size: 11.0
background-color: '#232323'
color: '#ffffff'
@tkjaergaard
tkjaergaard / Preferences.sublime-settings
Created May 31, 2013 10:23
Preferences.sublime-settings
{
"color_scheme": "Packages/User/Laravel.tmTheme",
"detect_indentation": false,
"font_size": 19.0,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 7,
"line_padding_top": 7,
<?php spl_autoload_register(function($c){@include preg_replace('#\\\|_(?!.+\\\)#','/',$c).'.php';});