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 | |
| $headers = get_headers($_GET['url']); | |
| $resp = explode(' ', $headers[0])[1]; | |
| $OK_CODES = array('200', '301', '302', '303', '307'); | |
| if(in_array($resp, $OK_CODES)) { | |
| echo "<h1>URL IS OK</h1>"; |
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
| var CONFIG = { | |
| snd: '#sound', // jquery selector for element | |
| fadeout_time: 100, // miliseconds for volume change | |
| fadeout_step: 0.1, // amount to reduce by | |
| max_volume: 1 // change to limit maximum | |
| } | |
| function volumeFader(end_volume, step, time, callback) { | |
| var current_volume = $(CONFIG.snd)[0].volume; |
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
| <style type="text/css" media="screen"> | |
| body { | |
| background: #000; | |
| width: 1000px; | |
| margin: 0 auto; | |
| overflow: hidden; | |
| } | |
| </style> | |
| <body> |
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
| D/AndEngine(12299): AndengineSimple.onResumeGame @(Thread: 'main') | |
| D/SurfaceFlinger( 96): Layer::requestBuffer(this=0xa4aaf8), index=1, pid=12299, w=800, h=480 success | |
| E/AndroidRuntime(12299): FATAL EXCEPTION: GLThread 10 | |
| E/AndroidRuntime(12299): java.lang.ExceptionInInitializerError | |
| E/AndroidRuntime(12299): at org.andengine.opengl.vbo.attribute.VertexBufferObjectAttributeFix.glVertexAttribPointer(VertexBufferObjectAttributeFix.java:39) | |
| E/AndroidRuntime(12299): at org.andengine.opengl.vbo.attribute.VertexBufferObjectAttributes.glVertexAttribPointers(VertexBufferObjectAttributes.java:50) | |
| E/AndroidRuntime(12299): at org.andengine.opengl.shader.ShaderProgram.bind(ShaderProgram.java:126) | |
| E/AndroidRuntime(12299): at org.andengine.opengl.shader.PositionColorTextureCoordinatesShaderProgram.bind(PositionColorTextureCoordinatesShaderProgram.java:89) | |
| E/AndroidRuntime(12299): at org.andengine.opengl.vbo.VertexBufferObject.bind(VertexBufferObject.java:160) | |
| E/AndroidRuntime(12299): at org.andengine.entity.sprite.S |
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
| ====================================================== | |
| Setting up Django using Apache/mod_wsgi on Ubuntu 8.10 | |
| ====================================================== | |
| This article will cover setting up Django using Apache/mod_wsgi on Ubuntu | |
| 8.10. The article is targeted at a production environment, but keep in mind | |
| this is a more generalized environment. You may have different requirements, | |
| but this article should at least provide the stepping stones. | |
| The article will use distribution packages where nesscary. As of 8.10 the |
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
| [11:20][bowser][jaymz][~/development/www/sneekapedia]$ bundle | |
| bash: bundle: command not found | |
| [11:20][bowser][jaymz][~/development/www/sneekapedia]$ gem install bundler -v '~> 1.0.0' | |
| Fetching: bundler-1.0.22.gem (100%) | |
| Successfully installed bundler-1.0.22 | |
| 1 gem installed | |
| Installing ri documentation for bundler-1.0.22... | |
| Installing RDoc documentation for bundler-1.0.22... | |
| [11:20][bowser][jaymz][~/development/www/sneekapedia]$ bundle -v | |
| Bundler version 1.1.3 |
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
| _________________________________ | |
| / have you created the functional \ | |
| \ specification? / | |
| --------------------------------- | |
| \ _ | |
| \ (_) | |
| \ ^__^ / \ | |
| \ (oo)\_____/_\ \ | |
| (__)\ ) / |
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 sumIfColor() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var sheet = ss.getSheets()[0]; | |
| var nrows = sheet.getMaxRows(); | |
| var color_cell = Browser.inputBox("Cell with background color to use?"); | |
| var output_cell = Browser.inputBox("Output cell? (Eg. D3)"); | |
| var color_match = sheet.getRange(color_cell).getBackgroundColor(); | |
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
| benchmark for large instance: | |
| HTML transferred: 65036704 bytes | |
| Requests per second: 217.08 [#/sec] (mean) | |
| Time per request: 460.653 [ms] (mean) | |
| Time per request: 4.607 [ms] (mean, across all concurrent requests) | |
| Transfer rate: 2819.80 [Kbytes/sec] received | |
| and on our micro one: |
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
| from django.contrib import admin | |
| from dummy.models import * | |
| class EventAdmin(admin.ModelAdmin): | |
| fieldsets = [ | |
| (None, {'fields': ['title']}), | |
| ('Date information', {'fields': ['date_start', 'date_end']}), | |
| ] |