This file contains 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 http = require('http'), | |
md5 = require('MD5'); | |
var options = { | |
method: 'HEAD', | |
host: 'www.gravatar.com', | |
port: 80, | |
path: '/avatar/' + md5('info@blabla.be') + '?d=http://bla.com' | |
}; | |
var req = http.request(options, function(res) { |
This file contains 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 sum( $number1, $number2 ) | |
{ | |
if( ! is_int( $number1 ) || ! is_int( $number2 ) ) | |
throw new Exception( 'Both arguments should be numeric' ); | |
return $number1 + $number2; | |
} |
This file contains 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
<div class="bbbx-widget" data-widget="11"></div> | |
<script type="text/javascript"> | |
var bbbx_widget_id = 11; | |
var bbbx_visual = false; | |
var bbbx_share_enabled = false; | |
function bbbx_config() { | |
this.subscribe('published', function(e) { | |
BBBX.$('.bubobox_result').html('<a href="javascript:mybb.openPlayer(\'' + e.entryId + '\')">Video bekijken</a> | <a href="javascript:mybb.openRecorder()">Video opnieuw opnemen</a>'); | |
BBBX.$('#video_id').val(e.entryId); |
This file contains 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
# replace "release-" on the following line with the string you want to search for | |
# or remove the "| grep release-" part to remove all local and remote tags | |
for t in `git tag | grep release-` | |
do | |
echo "delete $t" | |
git push origin :$t # Delete remote | |
git tag -d $t # Delete local | |
done |
This file contains 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 bbbx_stack_presets = { | |
'overlay' : { | |
modules: [ | |
'pre', | |
'terms.pre', | |
'terms', | |
'terms.post', | |
'overlay.pre', | |
'overlay', | |
'overlay.post', |
This file contains 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
<script> | |
(function(i,s,o,g,r,a,m){i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)}; | |
a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=a.defer=1;a.src=g; | |
m.parentNode.insertBefore(a,m)})(window,document,'script','//api.bubobox.com/tracker.js','_bbq'); | |
_bbq('init', { user_id: 1, segment: 'website' }); | |
</script> |
This file contains 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 app = express(); | |
... | |
app.use(function(req, res, next) { | |
if (req.headers['x-forwarded-proto'] === 'https') { | |
next(); // already on https so just continue | |
else | |
res.redirect('https://' + req.headers.host + req.url); // redirect to https | |
}); |
This file contains 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
*:focus:before { | |
content: "⇥"; | |
position: absolute; | |
font-size: 0.8em; | |
left: 5px; | |
top: -30%; | |
} |
This file contains 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
<link href='http://fonts.googleapis.com/css?family=Coming+Soon' rel='stylesheet' type='text/css'> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
body{ | |
/* defaults, use for testing the template without PhantomJS */ | |
width: 400px; | |
height: 400px; | |
font-size: 400px; |
This file contains 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
<link href='http://fonts.googleapis.com/css?family=Lora' rel='stylesheet' type='text/css'> | |
<style> | |
body{ | |
/* defaults, use for testing the template without PhantomJS */ | |
width: 400px; | |
height: 400px; | |
background-color: #2e3192; | |
font-size: 400px; |