Skip to content

Instantly share code, notes, and snippets.

@quilime
quilime / imageslice.sh
Created January 14, 2010 20:10
split single image into multiple tiles w/imagemagick
#!/bin/bash
#copyright: 2009
#author: gabriel dunne
#url: quilime.com
IMAGE=$1
IMAGE_W=$2
IMAGE_H=$3
ROWS=$4
COLS=$5
@quilime
quilime / rename_multiple_files.sh
Created January 11, 2010 08:10
rename multiple files in dir
ls | nl -nrz -w2 | while read a b; do mv "$b" filename.$a.png; done;
@quilime
quilime / DARK.dvtcolortheme
Created January 22, 2015 03:38
monochrome xcode theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
<?php
function get_patches($dir){
global $c, $inc, $offset_left, $offset_top;
$dir_array = [];
$inc = 0;
$path = realpath($dir);
//$dirs = new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS);
$dirs = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS);
<?php
function get_patches($dir) {
global $c, $inc, $offset_left, $offset_top;
$inc = 0;
$dir_array = [];
$path = realpath($dir);
<?php
class MyRecursiveFilterIterator extends RecursiveFilterIterator {
public function accept() {
return
$this->current()->isDir() &&
strpos($this->current()->getFilename(), '.') === false;
}
}
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
shape-rendering: crispEdges;
}
.day {
<!DOCTYPE html>
<meta charset="utf-8">
Hello, world!!!