github-widget 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. data/.gitignore +1 -0
  2. data/README.md +92 -0
  3. data/app/assets/images/github-widget/public.png +0 -0
  4. data/app/assets/images/github-widget/public_fork.png +0 -0
  5. data/app/assets/images/github-widget/repostat_forks.png +0 -0
  6. data/app/assets/images/github-widget/repostat_watchers.png +0 -0
  7. data/app/assets/javascripts/github-widget/projects.js.coffee +16 -0
  8. data/app/assets/stylesheets/github-widget/projects.css.sass.erb +95 -0
  9. data/app/views/github-widget/_projects.hbs +38 -0
  10. data/develop-example/.gitignore +5 -0
  11. data/develop-example/Gemfile +44 -0
  12. data/develop-example/Gemfile.lock +139 -0
  13. data/develop-example/README +261 -0
  14. data/develop-example/Rakefile +7 -0
  15. data/develop-example/app/assets/images/rails.png +0 -0
  16. data/develop-example/app/assets/javascripts/application.js +12 -0
  17. data/develop-example/app/assets/javascripts/github-widget/projects.js.coffee +16 -0
  18. data/develop-example/app/assets/javascripts/home.js.coffee +3 -0
  19. data/develop-example/app/assets/javascripts/plugins.js.coffee +20 -0
  20. data/develop-example/app/assets/stylesheets/application.css +292 -0
  21. data/develop-example/app/assets/stylesheets/home.css.scss +8 -0
  22. data/develop-example/app/controllers/application_controller.rb +3 -0
  23. data/develop-example/app/controllers/home_controller.rb +5 -0
  24. data/develop-example/app/helpers/application_helper.rb +2 -0
  25. data/develop-example/app/helpers/home_helper.rb +2 -0
  26. data/develop-example/app/mailers/.gitkeep +0 -0
  27. data/develop-example/app/models/.gitkeep +0 -0
  28. data/develop-example/app/views/github_widget/_projects.hbs +38 -0
  29. data/develop-example/app/views/home/index.html.erb +0 -0
  30. data/develop-example/app/views/layouts/application.html.erb +62 -0
  31. data/develop-example/config.ru +4 -0
  32. data/develop-example/config/application.rb +42 -0
  33. data/develop-example/config/boot.rb +6 -0
  34. data/develop-example/config/database.yml +25 -0
  35. data/develop-example/config/environment.rb +5 -0
  36. data/develop-example/config/environments/development.rb +27 -0
  37. data/develop-example/config/environments/production.rb +54 -0
  38. data/develop-example/config/environments/test.rb +39 -0
  39. data/develop-example/config/initializers/backtrace_silencers.rb +7 -0
  40. data/develop-example/config/initializers/inflections.rb +10 -0
  41. data/develop-example/config/initializers/mime_types.rb +5 -0
  42. data/develop-example/config/initializers/secret_token.rb +7 -0
  43. data/develop-example/config/initializers/session_store.rb +8 -0
  44. data/develop-example/config/initializers/wrap_parameters.rb +12 -0
  45. data/develop-example/config/locales/en.yml +5 -0
  46. data/develop-example/config/routes.rb +60 -0
  47. data/develop-example/db/seeds.rb +7 -0
  48. data/develop-example/doc/README_FOR_APP +2 -0
  49. data/develop-example/lib/tasks/.gitkeep +0 -0
  50. data/develop-example/log/.gitkeep +0 -0
  51. data/develop-example/public/.htaccess +522 -0
  52. data/develop-example/public/404.html +26 -0
  53. data/develop-example/public/422.html +26 -0
  54. data/develop-example/public/500.html +26 -0
  55. data/develop-example/public/apple-touch-icon-114x114-precomposed.png +0 -0
  56. data/develop-example/public/apple-touch-icon-57x57-precomposed.png +0 -0
  57. data/develop-example/public/apple-touch-icon-72x72-precomposed.png +0 -0
  58. data/develop-example/public/apple-touch-icon-precomposed.png +0 -0
  59. data/develop-example/public/apple-touch-icon.png +0 -0
  60. data/develop-example/public/crossdomain.xml +25 -0
  61. data/develop-example/public/favicon.ico +0 -0
  62. data/develop-example/public/humans.txt +43 -0
  63. data/develop-example/public/robots.txt +5 -0
  64. data/develop-example/script/rails +6 -0
  65. data/develop-example/test/fixtures/.gitkeep +0 -0
  66. data/develop-example/test/functional/.gitkeep +0 -0
  67. data/develop-example/test/functional/home_controller_test.rb +9 -0
  68. data/develop-example/test/integration/.gitkeep +0 -0
  69. data/develop-example/test/performance/browsing_test.rb +12 -0
  70. data/develop-example/test/test_helper.rb +13 -0
  71. data/develop-example/test/unit/.gitkeep +0 -0
  72. data/develop-example/test/unit/helpers/home_helper_test.rb +4 -0
  73. data/develop-example/vendor/assets/stylesheets/.gitkeep +0 -0
  74. data/develop-example/vendor/plugins/.gitkeep +0 -0
  75. data/github-widget.gemspec +21 -0
  76. data/lib/generators/github_widget/USAGE +11 -0
  77. data/lib/generators/github_widget/github_widget_generator.rb +10 -0
  78. data/lib/github-widget.rb +4 -0
  79. data/lib/github-widget/version.rb +9 -0
  80. data/snapshot.png +0 -0
  81. metadata +135 -0
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
File without changes
File without changes
@@ -0,0 +1,522 @@
1
+ # Apache configuration file
2
+ # httpd.apache.org/docs/2.2/mod/quickreference.html
3
+
4
+ # Note .htaccess files are an overhead, this logic should be in your Apache config if possible
5
+ # httpd.apache.org/docs/2.2/howto/htaccess.html
6
+
7
+ # Techniques in here adapted from all over, including:
8
+ # Kroc Camen: camendesign.com/.htaccess
9
+ # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
10
+ # Sample .htaccess file of CMS MODx: modxcms.com
11
+
12
+
13
+ ###
14
+ ### If you run a webserver other than apache, consider:
15
+ ### github.com/paulirish/html5-boilerplate-server-configs
16
+ ###
17
+
18
+
19
+
20
+ # ----------------------------------------------------------------------
21
+ # Better website experience for IE users
22
+ # ----------------------------------------------------------------------
23
+
24
+ # Force the latest IE version, in various cases when it may fall back to IE7 mode
25
+ # github.com/rails/rails/commit/123eb25#commitcomment-118920
26
+ # Use ChromeFrame if it's installed for a better experience for the poor IE folk
27
+
28
+ <IfModule mod_setenvif.c>
29
+ <IfModule mod_headers.c>
30
+ BrowserMatch MSIE ie
31
+ Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
32
+ </IfModule>
33
+ </IfModule>
34
+
35
+ <IfModule mod_headers.c>
36
+ # Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
37
+ # We need to inform proxies that content changes based on UA
38
+ Header append Vary User-Agent
39
+ # Cache control is set only if mod_headers is enabled, so that's unncessary to declare
40
+ </IfModule>
41
+
42
+
43
+ # ----------------------------------------------------------------------
44
+ # Cross-domain AJAX requests
45
+ # ----------------------------------------------------------------------
46
+
47
+ # Serve cross-domain ajax requests, disabled.
48
+ # enable-cors.org
49
+ # code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
50
+
51
+ # <IfModule mod_headers.c>
52
+ # Header set Access-Control-Allow-Origin "*"
53
+ # </IfModule>
54
+
55
+
56
+
57
+ # ----------------------------------------------------------------------
58
+ # Webfont access
59
+ # ----------------------------------------------------------------------
60
+
61
+ # allow access from all domains for webfonts
62
+ # alternatively you could only whitelist
63
+ # your subdomains like "sub.domain.com"
64
+
65
+ <FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
66
+ <IfModule mod_headers.c>
67
+ Header set Access-Control-Allow-Origin "*"
68
+ </IfModule>
69
+ </FilesMatch>
70
+
71
+
72
+
73
+ # ----------------------------------------------------------------------
74
+ # Proper MIME type for all files
75
+ # ----------------------------------------------------------------------
76
+
77
+ # audio
78
+ AddType audio/ogg oga ogg
79
+ AddType audio/mp4 m4a
80
+
81
+ # video
82
+ AddType video/ogg ogv
83
+ AddType video/mp4 mp4 m4v
84
+ AddType video/webm webm
85
+
86
+ # Proper svg serving. Required for svg webfonts on iPad
87
+ # twitter.com/FontSquirrel/status/14855840545
88
+ AddType image/svg+xml svg svgz
89
+ AddEncoding gzip svgz
90
+
91
+ # webfonts
92
+ AddType application/vnd.ms-fontobject eot
93
+ AddType font/truetype ttf
94
+ AddType font/opentype otf
95
+ AddType application/x-font-woff woff
96
+
97
+ # assorted types
98
+ AddType image/x-icon ico
99
+ AddType image/webp webp
100
+ AddType text/cache-manifest appcache manifest
101
+ AddType text/x-component htc
102
+ AddType application/x-chrome-extension crx
103
+ AddType application/x-xpinstall xpi
104
+ AddType application/octet-stream safariextz
105
+ AddType text/x-vcard vcf
106
+
107
+
108
+
109
+ # ----------------------------------------------------------------------
110
+ # Allow concatenation from within specific js and css files
111
+ # ----------------------------------------------------------------------
112
+
113
+ # e.g. Inside of script.combined.js you could have
114
+ # <!--#include file="libs/jquery-1.5.0.min.js" -->
115
+ # <!--#include file="plugins/jquery.idletimer.js" -->
116
+ # and they would be included into this single file
117
+
118
+ # this is not in use in the boilerplate as it stands. you may
119
+ # choose to name your files in this way for this advantage
120
+ # or concatenate and minify them manually.
121
+ # Disabled by default.
122
+
123
+ # <FilesMatch "\.combined\.(js|css)$">
124
+ # Options +Includes
125
+ # SetOutputFilter INCLUDES
126
+ # </FilesMatch>
127
+
128
+
129
+
130
+ # ----------------------------------------------------------------------
131
+ # gzip compression
132
+ # ----------------------------------------------------------------------
133
+
134
+ <IfModule mod_deflate.c>
135
+
136
+
137
+ # force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
138
+ <IfModule mod_setenvif.c>
139
+ <IfModule mod_headers.c>
140
+ SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
141
+ RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
142
+ </IfModule>
143
+ </IfModule>
144
+ # html, txt, css, js, json, xml, htc:
145
+ <IfModule filter_module>
146
+ FilterDeclare COMPRESS
147
+ FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
148
+ FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
149
+ FilterChain COMPRESS
150
+ FilterProtocol COMPRESS change=yes;byteranges=no
151
+ </IfModule>
152
+
153
+ <IfModule !mod_filter.c>
154
+ # Legacy versions of Apache
155
+ AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
156
+ AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
157
+ AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
158
+ </IfModule>
159
+
160
+ # webfonts and svg:
161
+ <FilesMatch "\.(ttf|otf|eot|svg)$" >
162
+ SetOutputFilter DEFLATE
163
+ </FilesMatch>
164
+ </IfModule>
165
+
166
+
167
+
168
+ # ----------------------------------------------------------------------
169
+ # Expires headers (for better cache control)
170
+ # ----------------------------------------------------------------------
171
+
172
+ # these are pretty far-future expires headers
173
+ # they assume you control versioning with cachebusting query params like
174
+ # <script src="application.js?20100608">
175
+ # additionally, consider that outdated proxies may miscache
176
+ # www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
177
+
178
+ # if you don't use filenames to version, lower the css and js to something like
179
+ # "access plus 1 week" or so
180
+
181
+ <IfModule mod_expires.c>
182
+ ExpiresActive on
183
+
184
+ # Perhaps better to whitelist expires rules? Perhaps.
185
+ ExpiresDefault "access plus 1 month"
186
+
187
+ # cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
188
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
189
+
190
+ # your document html
191
+ ExpiresByType text/html "access plus 0 seconds"
192
+
193
+ # data
194
+ ExpiresByType text/xml "access plus 0 seconds"
195
+ ExpiresByType application/xml "access plus 0 seconds"
196
+ ExpiresByType application/json "access plus 0 seconds"
197
+
198
+ # rss feed
199
+ ExpiresByType application/rss+xml "access plus 1 hour"
200
+
201
+ # favicon (cannot be renamed)
202
+ ExpiresByType image/x-icon "access plus 1 week"
203
+
204
+ # media: images, video, audio
205
+ ExpiresByType image/gif "access plus 1 month"
206
+ ExpiresByType image/png "access plus 1 month"
207
+ ExpiresByType image/jpg "access plus 1 month"
208
+ ExpiresByType image/jpeg "access plus 1 month"
209
+ ExpiresByType video/ogg "access plus 1 month"
210
+ ExpiresByType audio/ogg "access plus 1 month"
211
+ ExpiresByType video/mp4 "access plus 1 month"
212
+ ExpiresByType video/webm "access plus 1 month"
213
+
214
+ # htc files (css3pie)
215
+ ExpiresByType text/x-component "access plus 1 month"
216
+
217
+ # webfonts
218
+ ExpiresByType font/truetype "access plus 1 month"
219
+ ExpiresByType font/opentype "access plus 1 month"
220
+ ExpiresByType application/x-font-woff "access plus 1 month"
221
+ ExpiresByType image/svg+xml "access plus 1 month"
222
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
223
+
224
+ # css and javascript
225
+ ExpiresByType text/css "access plus 1 year"
226
+ ExpiresByType application/javascript "access plus 1 year"
227
+ ExpiresByType text/javascript "access plus 1 year"
228
+
229
+ <IfModule mod_headers.c>
230
+ Header append Cache-Control "public"
231
+ </IfModule>
232
+
233
+ </IfModule>
234
+
235
+
236
+
237
+ # ----------------------------------------------------------------------
238
+ # ETag removal
239
+ # ----------------------------------------------------------------------
240
+
241
+ # FileETag None is not enough for every server.
242
+ <IfModule mod_headers.c>
243
+ Header unset ETag
244
+ </IfModule>
245
+
246
+ # Since we're sending far-future expires, we don't need ETags for
247
+ # static content.
248
+ # developer.yahoo.com/performance/rules.html#etags
249
+ FileETag None
250
+
251
+
252
+
253
+ # ----------------------------------------------------------------------
254
+ # Stop screen flicker in IE on CSS rollovers
255
+ # ----------------------------------------------------------------------
256
+
257
+ # The following directives stop screen flicker in IE on CSS rollovers - in
258
+ # combination with the "ExpiresByType" rules for images (see above). If
259
+ # needed, un-comment the following rules.
260
+
261
+ # BrowserMatch "MSIE" brokenvary=1
262
+ # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
263
+ # BrowserMatch "Opera" !brokenvary
264
+ # SetEnvIf brokenvary 1 force-no-vary
265
+
266
+
267
+
268
+ # ----------------------------------------------------------------------
269
+ # Cookie setting from iframes
270
+ # ----------------------------------------------------------------------
271
+
272
+ # Allow cookies to be set from iframes (for IE only)
273
+ # If needed, uncomment and specify a path or regex in the Location directive
274
+
275
+ # <IfModule mod_headers.c>
276
+ # <Location />
277
+ # Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
278
+ # </Location>
279
+ # </IfModule>
280
+
281
+
282
+
283
+ # ----------------------------------------------------------------------
284
+ # Start rewrite engine
285
+ # ----------------------------------------------------------------------
286
+
287
+ # Turning on the rewrite engine is necessary for the following rules and features.
288
+ # FollowSymLinks must be enabled for this to work.
289
+
290
+ <IfModule mod_rewrite.c>
291
+ Options +FollowSymlinks
292
+ RewriteEngine On
293
+ </IfModule>
294
+
295
+
296
+
297
+ # ----------------------------------------------------------------------
298
+ # Suppress or force the "www." at the beginning of URLs
299
+ # ----------------------------------------------------------------------
300
+
301
+ # The same content should never be available under two different URLs - especially not with and
302
+ # without "www." at the beginning, since this can cause SEO problems (duplicate content).
303
+ # That's why you should choose one of the alternatives and redirect the other one.
304
+
305
+ # By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
306
+ # no-www.org/faq.php?q=class_b
307
+
308
+ # If you rather want to use option 2, just comment out all option 1 lines
309
+ # and uncomment option 2.
310
+ # IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
311
+
312
+ # ----------------------------------------------------------------------
313
+
314
+ # Option 1:
315
+ # Rewrite "www.domain.com -> domain.com"
316
+
317
+ <IfModule mod_rewrite.c>
318
+ RewriteCond %{HTTPS} !=on
319
+ RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
320
+ RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
321
+ </IfModule>
322
+
323
+ # ----------------------------------------------------------------------
324
+
325
+ # Option 2:
326
+ # To rewrite "domain.com -> www.domain.com" uncomment the following lines.
327
+ # Be aware that the following rule might not be a good idea if you
328
+ # use "real" subdomains for certain parts of your website.
329
+
330
+ # <IfModule mod_rewrite.c>
331
+ # RewriteCond %{HTTPS} !=on
332
+ # RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
333
+ # RewriteCond %{HTTP_HOST} (.+)$ [NC]
334
+ # RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
335
+ # </IfModule>
336
+
337
+
338
+
339
+ # ----------------------------------------------------------------------
340
+ # Add/remove trailing slash to (non-file) URLs
341
+ # ----------------------------------------------------------------------
342
+
343
+ # Google treats URLs with and without trailing slashes separately.
344
+ # Forcing a trailing slash is usually preferred, but all that's really
345
+ # important is that one correctly redirects to the other.
346
+
347
+ # By default option 1 (force trailing slash) is activated.
348
+ # http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
349
+ # http://www.alistapart.com/articles/slashforward/
350
+ # http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#url Trailing Slash Problem
351
+
352
+ # ----------------------------------------------------------------------
353
+
354
+ # Option 1:
355
+ # Rewrite "domain.com/foo -> domain.com/foo/"
356
+
357
+ <IfModule mod_rewrite.c>
358
+ RewriteCond %{REQUEST_FILENAME} !-f
359
+ RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
360
+ RewriteRule ^(.*)$ $1/ [R=301,L]
361
+ </IfModule>
362
+
363
+ # ----------------------------------------------------------------------
364
+
365
+ # Option 2:
366
+ # Rewrite "domain.com/foo/ -> domain.com/foo"
367
+
368
+ #<IfModule mod_rewrite.c>
369
+ # RewriteRule ^(.*)/$ $1 [R=301,L]
370
+ #</IfModule>
371
+
372
+
373
+
374
+ # ----------------------------------------------------------------------
375
+ # Built-in filename-based cache busting
376
+ # ----------------------------------------------------------------------
377
+
378
+ # If you're not using the build script to manage your filename version revving,
379
+ # you might want to consider enabling this, which will route requests for
380
+ # /css/style.20110203.css to /css/style.css
381
+
382
+ # To understand why this is important and a better idea than all.css?v1231,
383
+ # read: github.com/paulirish/html5-boilerplate/wiki/Version-Control-with-Cachebusting
384
+
385
+ # Uncomment to enable.
386
+ # <IfModule mod_rewrite.c>
387
+ # RewriteCond %{REQUEST_FILENAME} !-f
388
+ # RewriteCond %{REQUEST_FILENAME} !-d
389
+ # RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
390
+ # </IfModule>
391
+
392
+
393
+
394
+ # ----------------------------------------------------------------------
395
+ # Prevent SSL cert warnings
396
+ # ----------------------------------------------------------------------
397
+
398
+ # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
399
+ # https://www.domain.com when your cert only allows https://secure.domain.com
400
+ # Uncomment the following lines to use this feature.
401
+
402
+ # <IfModule mod_rewrite.c>
403
+ # RewriteCond %{SERVER_PORT} !^443
404
+ # RewriteRule (.*) https://example-domain-please-change-me.com/$1 [R=301,L]
405
+ # </IfModule>
406
+
407
+
408
+
409
+ # ----------------------------------------------------------------------
410
+ # Prevent 404 errors for non-existing redirected folders
411
+ # ----------------------------------------------------------------------
412
+
413
+ # without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
414
+ # e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
415
+
416
+ Options -MultiViews
417
+
418
+
419
+
420
+ # ----------------------------------------------------------------------
421
+ # custom 404 page
422
+ # ----------------------------------------------------------------------
423
+
424
+ # You can add custom pages to handle 500 or 403 pretty easily, if you like.
425
+ ErrorDocument 404 /404.html
426
+
427
+
428
+
429
+ # ----------------------------------------------------------------------
430
+ # UTF-8 encoding
431
+ # ----------------------------------------------------------------------
432
+
433
+ # use utf-8 encoding for anything served text/plain or text/html
434
+ AddDefaultCharset utf-8
435
+
436
+ # force utf-8 for a number of file formats
437
+ AddCharset utf-8 .html .css .js .xml .json .rss
438
+
439
+
440
+
441
+ # ----------------------------------------------------------------------
442
+ # A little more security
443
+ # ----------------------------------------------------------------------
444
+
445
+
446
+ # Do we want to advertise the exact version number of Apache we're running?
447
+ # Probably not.
448
+ ## This can only be enabled if used in httpd.conf - It will not work in .htaccess
449
+ # ServerTokens Prod
450
+
451
+
452
+ # "-Indexes" will have Apache block users from browsing folders without a default document
453
+ # Usually you should leave this activated, because you shouldn't allow everybody to surf through
454
+ # every folder on your server (which includes rather private places like CMS system folders).
455
+ Options -Indexes
456
+
457
+
458
+ # Block access to "hidden" directories whose names begin with a period. This
459
+ # includes directories used by version control systems such as Subversion or Git.
460
+ <IfModule mod_rewrite.c>
461
+ RewriteRule "(^|/)\." - [F]
462
+ </IfModule>
463
+
464
+
465
+ # If your server is not already configured as such, the following directive
466
+ # should be uncommented in order to set PHP's register_globals option to OFF.
467
+ # This closes a major security hole that is abused by most XSS (cross-site
468
+ # scripting) attacks. For more information: http://php.net/register_globals
469
+ #
470
+ # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
471
+ #
472
+ # Your server does not allow PHP directives to be set via .htaccess. In that
473
+ # case you must make this change in your php.ini file instead. If you are
474
+ # using a commercial web host, contact the administrators for assistance in
475
+ # doing this. Not all servers allow local php.ini files, and they should
476
+ # include all PHP configurations (not just this one), or you will effectively
477
+ # reset everything to PHP defaults. Consult www.php.net for more detailed
478
+ # information about setting PHP directives.
479
+
480
+ # php_flag register_globals Off
481
+
482
+ # rename session cookie to something else, than PHPSESSID
483
+ # php_value session.name sid
484
+
485
+ # do not show you are using php
486
+ # php_flag expose_php Off
487
+
488
+ # level of log detail - log all errors
489
+ # php_value error_reporting -1
490
+
491
+ # write errors to log file
492
+ # php_flag log_errors On
493
+
494
+ # do not display errors in browser (production - Off, development - On)
495
+ # php_flag display_errors Off
496
+
497
+ # do not display startup errors (production - Off, development - On)
498
+ # php_flag display_startup_errors Off
499
+
500
+ # format errors in plain text
501
+ # php_flag html_errors Off
502
+
503
+ # show multiple occurrence of error
504
+ # php_flag ignore_repeated_errors Off
505
+
506
+ # show same errors from different sources
507
+ # php_flag ignore_repeated_source Off
508
+
509
+ # size limit for error messages
510
+ # php_value log_errors_max_len 1024
511
+
512
+ # don't precede error with string (doesn't accept empty string, use whitespace if you need)
513
+ # php_value error_prepend_string " "
514
+
515
+ # don't prepend to error (doesn't accept empty string, use whitespace if you need)
516
+ # php_value error_append_string " "
517
+
518
+ # Increase cookie security
519
+ <IfModule php5_module>
520
+ php_value session.cookie_httponly true
521
+ </IfModule>
522
+