Showing latest added snippets.

PHP Starter - Snippet icon PHP Starter
  1. <?php
  2. print "Hello World";
  3. ?>
See the complete snippet
Language: PHP
Tags:
Submitted By: EdoDodo
Java Starter - Snippet icon Java Starter
  1. class HelloWorld {
  2. public static void main(String args[]) {
  3. System.out.print("Hello World");
  4. }
  5. }
See the complete snippet
Language: Java
Tags:
Submitted By: EdoDodo
XHTML 1.0 Transitional - Snippet icon XHTML 1.0 Transitional
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title>untitled</title>
  7. </head>
  8.  
  9. </body>
  10. </html>
See the complete snippet
Language: HTML
Tags:
Submitted By: EdoDodo
HTML 4.01 Transitional - Snippet icon HTML 4.01 Transitional
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html lang="en">
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>untitled</title>
  6. </head>
  7.  
  8. </body>
  9. </html>
See the complete snippet
Language: HTML
Tags:
Submitted By: EdoDodo
Objective-C Starter - Snippet icon Objective-C Starter
  1. #import <Foundation/Foundation.h>
  2.  
  3. int main (int argc, const char * argv[]) {
  4. NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  5.  
  6. NSLog(@"Hello World");
  7. [pool release];
  8. return 0;
  9. }
See the complete snippet
Language: Objective-C
Tags:
Submitted By: EdoDodo
Disable Dashboard - Snippet icon Disable Dashboard
  1. Disable Dashboard
  2.  
  3. Disable
  4.  
  5. defaults write com.apple.dashboard mcx-disabled -boolean YES
  6.  
  7. killall Dock
  8.  
  9.  
  10.  
  11.  
  12.  
  13. ReEnable
  14.  
  15. defaults write com.apple.dashboard mcx-disabled -boolean NO
  16.  
  17. killall Dock
  18.  
See the complete snippet
Language: Plain Text
Tags: OS X terminal
Submitted By: monomaniacally
Disable Spotlight - Snippet icon Disable Spotlight
  1. Disable Spotlight
  2.  
  3. To turn Spotlight Indexing off and on in Mac OS X 10.6 Snow Leopard, and to remove the Menu Bar Icon, follow these steps...
  4.  
  5. To turn Spotlight Indexing off in open Terminal and run this command:
  6.  
  7. sudo mdutil -a -i off
  8.  
  9. To turn Spotlight Indexing back on, repeat the above command, but change off to on. To remove the menu bar icon, run this Terminal command:
  10.  
  11. sudo chmod 600 /Syste
See the complete snippet
Language: Plain Text
Tags: OS X terminal
Submitted By: monomaniacally
Enable Path View in Finder - Snippet icon Enable Path View in Finder
  1. Enable Path View in Finder
  2.  
  3. defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
  4.  
  5. killall Finder
See the complete snippet
Language: Plain Text
Tags: OS X terminal
Submitted By: monomaniacally
Sticky Footer - Snippet icon Sticky Footer
  1. /*****************
  2. CSS
  3. ******************/
  4.  
  5. /*
  6. Sticky Footer Solution
  7. by Steve Hatcher
  8. http://stever.ca
  9. http://www.cssstickyfooter.com
  10. */
  11.  
  12. * {margin:0;padding:0;}
  13.  
  14. /* must declare 0 margins on everything, also for main layout components use padding, not
  15. vertical margins (top and bottom) to add spacing, else those margins get added to total height
  16. and your footer gets pushed down a bit more,
See the complete snippet
Language: HTML
Tags: Sticky Footer html css
Submitted By: monomaniacally
Background Center - Snippet icon Background Center
  1. body{
  2. background:url(images/??.jpg) no-repeat center top;
  3. }
  4.  
See the complete snippet
Language: CSS
Tags: center background BG css
Submitted By: monomaniacally
CSS Shorthand - Snippet icon CSS Shorthand
  1. /*Background*/
  2. element {
  3. background:red url(image.png) repeat top left scroll;
  4. }
  5.  
  6.  
  7. /*Font*/
  8. p {
  9. font:bold 1em/1.2em georgia,"times new roman",serif;
  10. }
  11.  
  12. /*border*/
  13. element {
  14. border:4px groove linen;
  15. }
  16.  
  17.  
  18. /*Margins*/
  19. /* adds a 10px margin to all four sides */
  20. element {
  21. margin:10px;
  22. }
  23.  
  24. /* adds a 20px margin to top and bottom
  25.   and a 5px margin to left and right */
  26. element {
  27. margin:20px 5px
See the complete snippet
Language: CSS
Tags: css shorthand
Submitted By: monomaniacally
Webkit Submit Hack - Snippet icon Webkit Submit Hack
  1. input[type="submit"] {
  2. background: #262C32;
  3. width: 150px;
  4. padding: 9px;
  5. letter-spacing: 1px;
  6. border: none;
  7. color: #EFDDA8;
  8. border-radius: 3px;
  9. -moz-border-radius: 3px;
  10. -webkit-border-radius: 3px;
  11. -webkit-appearance: none;
  12. }
  13.  
  14. Notice the last line of our CSS? By adding -webkit-appearance: none; we are telling mobile Safari that we explicitly don’t want our b
See the complete snippet
Language: CSS
Tags: css mobile web-kit hack
Submitted By: monomaniacally
Vendor Prefix - Snippet icon Vendor Prefix
  1. * Mozilla/Firefox/Gecko: -moz-
  2. * Webkit (Safari/Chrome): -webkit- (note: Some webkit prefixes only work in Safari, and not Chrome)
  3.  
  4.  
  5. Drop Shadows
  6. box-shadow: #333 3px 3px 4px;
  7. -moz-box-shadow: #333 3px 3px 4px;
  8. -webkit-box-shadow: #333 3px 3px 4px;
  9.  
  10. Gradients
  11. -moz-linear-gradient(-90deg,#1aa6de,#022147);
  12. -webkit-gradient(linear, left top, left bottom, from(#1aa6de), to(#022147));
  13.  
  14. RBGA
  15. bac
See the complete snippet
Language: CSS
Tags: css css3
Submitted By: monomaniacally
Browser Hacks - Snippet icon Browser Hacks
  1. /* IE 6 and below */
  2. 5.
  3. * html #uno { color: red }
  4. 6.
  5.  
  6. 7.
  7. /* IE 7 and below */
  8. 8.
  9. *:first-child+html #dos { color: red }
  10. 9.
  11.  
  12. 10.
  13. /* IE 7 and modern browsers */
  14. 11.
  15. html>body #tres { color: red }
  16. 12.
  17.  
  18. 13.
  19. /* Modern browsers (not IE 7) */
  20. 14.
  21. html>/**/body #cuatro { color: red }
  22. 15.
  23.  
  24. 16.
  25. /
See the complete snippet
Language: CSS
Tags: css browser hacks hack
Submitted By: monomaniacally
Dropdown Single - Snippet icon Dropdown Single
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3.  
  4. <title>Suckerfish Dropdowns - One Level Bones</title>
  5.  
  6. <style type="text/css">
  7.  
  8. #nav, #nav ul { /* all lists */
  9. padding: 0;
  10. margin: 0;
  11. list-style: none;
  12. line-height: 1;
  13. }
  14.  
  15. #nav a {
  16. display: block;
  17. width: 10em;
  18. }
  19.  
  20. #nav li { /* all list items */
  21. float: left;
  22. width: 10em; /* width
See the complete snippet
Language: HTML
Tags: html css dropdown single level
Submitted By: monomaniacally
Dropdown Double - Snippet icon Dropdown Double
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3.  
  4. <title>Suckerfish Dropdowns - Two Level Bones</title>
  5.  
  6. <style type="text/css">
  7. #nav, #nav ul { /* all lists */
  8. padding: 0;
  9. margin: 0;
  10. list-style: none;
  11. line-height: 1;
  12. }
  13.  
  14. #nav a {
  15. display: block;
  16. width: 10em;
  17. }
  18.  
  19. #nav li { /* all list items */
  20. float: left;
  21. width: 10em; /* width
See the complete snippet
Language: HTML
Tags: html css dropdown double level
Submitted By: monomaniacally
Drobdown Triple - Snippet icon Drobdown Triple
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3.  
  4. <title>Suckerfish Dropdowns - Three Level Bones</title>
  5.  
  6. <style type="text/css">
  7. #nav, #nav ul { /* all lists */
  8. padding: 0;
  9. margin: 0;
  10. list-style: none;
  11. line-height: 1;
  12. }
  13.  
  14. #nav a {
  15. display: block;
  16. width: 10em;
  17. }
  18.  
  19. #nav li { /* all list items */
  20. float: left;
  21. width: 10em; /* widt
See the complete snippet
Language: HTML
Tags: css html dropdown triple level
Submitted By: monomaniacally
Random Image from list - Snippet icon Random Image from list
  1. <script type="text/javascript">
  2. $(function() {
  3. var els = $('#headerImg li').get();
  4. var img_on=Math.floor(Math.random()*els.length)
  5. $('#headerImg li').hide();
  6. $('#headerImg li:eq(' + img_on + ')').show();
  7. });
  8. </script>
See the complete snippet
Scapbook Hardcode - Snippet icon Scapbook Hardcode
  1. <?php
  2. $block = Block::getByName('My Scrapbook Item');
  3. $block->display();
  4. ?>
See the complete snippet
Language: PHP
Tags: concrete5 scrapbook hardcode
Submitted By: monomaniacally
Auto Nav - Snippet icon Auto Nav
  1. <?php
  2. $bt_main = BlockType::getByHandle('autonav');
  3. $bt_main->controller->displayPages = 'custom'; // top, above, below, second_level, third_level, custom (Specify the displayPagesCID below)
  4. $bt_main->controller->displayPagesCID = '62'; // <-- Specify the CID of the page named: REPERTOIRE ( Gets the first level of pages under that section )
  5. $bt_main->controller->orderBy = 'display_as
See the complete snippet
Language: PHP
Tags: concrete5 embeded AutoNav
Submitted By: monomaniacally
Code Collector Pro Header Image

Get Code Collector Pro

Code Collector Pro is a storage app for code snippets. From HTML to Cocoa, C++ to Ruby, Code Collector Pro looks after all your code snippets, letting you quickly reference them whenever you want.

Find out more » Download Code Collector Pro 1.6.4

Web Analytics