This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| find * -type f -print0 | xargs -0 file | grep JPEG | sed 's/:.*//' | xargs -I file mogrify -format tif -quality 25 ./file |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| def myFunction(x:Int) = { | |
| val y = x | |
| def innerFunction(x: Int) = x | |
| myFunction(x) | |
| } |
| <?php | |
| use Behat\MinkExtension\Context\MinkContext; | |
| require_once "PHPUnit/Extensions/Database/TestCase.php"; | |
| class BaseFeatureContext extends MinkContext | |
| { | |
| private $databaseTester; | |
| public function getConnection() |
| <?php | |
| // I have crapped classes with better names. | |
| class AcmeSprocketFactory | |
| { | |
| ... | |
| public static function extractAndFormatNameEmbeddedInArrayWithPrefix( $array, $prefix ) | |
| { | |
| // all our functions should have zappy with-it names like this | |
| ... | |
| } |
| diff --git a/lib/active_record/connection_adapters/sqlserver/schema_statements.rb b/lib/active_record/connection_adapters/sqlserver/schema_statements.rb | |
| index 2e490a1..b2b6a87 100644 | |
| --- a/lib/active_record/connection_adapters/sqlserver/schema_statements.rb | |
| +++ b/lib/active_record/connection_adapters/sqlserver/schema_statements.rb | |
| @@ -193,10 +193,13 @@ module ActiveRecord | |
| ELSE NULL | |
| END AS [is_nullable], | |
| CASE | |
| - WHEN CCU.COLUMN_NAME IS NOT NULL AND TC.CONSTRAINT_TYPE = N'PRIMARY KEY' THEN 1 | |
| WHEN COLUMNPROPERTY(OBJECT_ID(columns.TABLE_SCHEMA+'.'+columns.TABLE_NAME), columns.COLUMN_NAME, 'IsIdentity') = 1 THEN 1 |
| module ActiveRecord | |
| module ConnectionAdapters | |
| module Sqlserver | |
| module SchemaStatements | |
| def identity_column(table_name) | |
| columns(table_name).detect(&:is_identity?) | |
| end | |
| def column_definitions(table_name) |