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
| rm -rf `find . -type d -name .git` |
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
| $(window).resize(function() { | |
| $(".container > img").each(function() { | |
| var cHeight = $(this).parent(".container").height(), | |
| cWidth = $(this).parent(".container").width(), | |
| iHeight = $(this).height(), | |
| iWidth = $(this).width(); | |
| $(this).css({ | |
| top: 0.5*(cHeight - iHeight), | |
| left: 0.5*(cWidth - iWidth) | |
| }); |
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
| function str2url($string, $slug = '-', $extra = null) | |
| { | |
| return strtolower(trim(preg_replace('~[^0-9a-z' . preg_quote($extra, '~') . ']+~i', $slug, unaccent($string)), $slug)); | |
| } | |
| function unaccent($string) // normalizes (romanization) accented chars | |
| { | |
| if (strpos($string = htmlentities($string, ENT_QUOTES, 'UTF-8'), '&') !== false) { | |
| $string = html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string), ENT_QUOTES, 'UTF-8'); | |
| } |
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
| function limitCheckboxes(control, max) { | |
| $(control).click(function () { | |
| if(!$(this).is(':checked')) { | |
| return true; | |
| } else if($(control).filter(":checked").length>max) { | |
| return 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
| <?php | |
| $text = wordwrap($text, 12, "​", true); |
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
| SELECT | |
| constraint_schema as db, | |
| CONCAT( table_name, '.', column_name, ' -> ', referenced_table_name, '.', referenced_column_name ) AS relationship | |
| FROM | |
| information_schema.key_column_usage | |
| WHERE | |
| referenced_table_name = 'TableName' | |
| ORDER BY | |
| constraint_schema, table_name, column_name; |
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
| SELECT table_comment | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE table_schema='my_cool_database' | |
| AND table_name='my_table'; |
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
| SELECT | |
| COLUMN_NAME,COLUMN_COMMENT | |
| FROM | |
| information_schema.COLUMNS | |
| WHERE | |
| TABLE_NAME = 'My_Table' |
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 | |
| function timezone_offset_string( $offset ) | |
| { | |
| return sprintf( "%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( $offset % 3600 ) ); | |
| } | |
| $offset = timezone_offset_get( new DateTimeZone( 'Europe/Warsaw' ), new DateTime() ); | |
| return array( | |
| 'service_manager' => array( | |
| 'factories' => array( |
OlderNewer