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
<!-- This simple piece of code will look for specific links, verify them using HEAD request to know if it exists/is accessible or not --> | |
<!-- Every failed files will be displayed into the failed-list <span> --> | |
<!-- NOTE : This script might "freeze" your browser for a while, don't worry, let it finish --> | |
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
<button id="launch-link-test">Test all links</button> | |
<li><a target="_blank" data-count="0" href="link-to-file.pdf">Link 0</a><span id="url-valid-0"></span></li> | |
<li><a target="_blank" data-count="1" href="link-to-file1.pdf">Link 1</a><span id="url-valid-1"></span></li> | |
<li><a target="_blank" data-count="2" href="link-to-file2.pdf">Link 2</a><span id="url-valid-2"></span></li> | |
<li><a target="_blank" data-count="3" href="link-to-file3.pdf">Link 3</a><span id="url-valid-3"></span></li> |
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
/* Get the ID from a youtube link */ | |
function getYoutubeID(url) { | |
var id = url.match("[\\?&]v=([^&#]*)"); | |
id = id[1]; | |
return id; | |
}; | |
/* Get an image preview of the video */ | |
var thumb_url = "http://i3.ytimg.com/vi/"+getYoutubeID('MY-YOUTUBE-VIDEO-URL')+"/maxresdefault.jpg"; | |
$('<img id="video-preview" src="'+thumb_url+'" />').prependTo($("div.preview-video")); |
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
#!/bin/sh | |
# Empty all rules | |
sudo iptables -t filter -F | |
sudo iptables -t filter -X | |
# Bloc everything by default | |
sudo iptables -t filter -P INPUT DROP | |
sudo iptables -t filter -P FORWARD DROP | |
sudo iptables -t filter -P OUTPUT DROP |
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
# Things needed to be adapted : | |
# server_name my-domain.com | |
# | |
# root /home/www | |
# The root of the Symfony "web" folder (with app.php and app_dev.php in it). | |
# | |
# fastcgi_pass unix:/var/run/php5-fpm.sock | |
# This sock can be elsewhere (/var/run/php5-fpm/php5-fpm.sock for example...) | |
# | |
# There are other things needed to be changed/fixed. |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
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 robots = new Array(); | |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.start = function( ev ){ |
NewerOlder