This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Create a new function based on the current line | |
Examples: | |
Line: myFunction | |
Output: a function with the name myFunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params = { | |
:font_size => 10 | |
} | |
# 1 | |
defaults = { | |
:font => "Times-Roman", | |
:font_size => 11, | |
:stroke => false | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name ._* -not -path *.svn* -exec svn rm {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A { | |
public $id; | |
public function __construct($id){ | |
$this->id = $id; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function resize($new_w, $new_h, $preserve=false){ | |
$name = $this->image; | |
$e = $this->getExtension(); | |
$filename = dirname($this->image) .'/'. $e['file'] .'_'. $new_w .'x'. $new_h . $e['extension']; | |
// this function only works if the imagecreatefromjpeg function exists | |
if(!function_exists('imagecreatefromjpeg')){ return false; } | |
// adapted from http://icant.co.uk/articles/phpthumbnails/ |
NewerOlder