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/bash | |
baseip=`echo $5 | cut -d'.' -f1-3` | |
ip route add $baseip.0/24 dev ppp0 |
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
# spec/support/resque_helper.rb | |
module ResqueHelper | |
def create_worker( queue_name ) | |
Resque.redis.flushall | |
@worker = Resque::Worker.new( queue_name ) | |
@worker.register_worker | |
return @worker | |
end | |
def perform_next_job(worker, &block) |
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
module.exports = ( grunt ) -> | |
grunt.initConfig | |
# Compile coffeescript | |
coffee: | |
options: | |
bare: true | |
sourceMap: false | |
compile: | |
files: [ | |
expand: true |
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 | |
// Set message | |
$this->flashMessenger() | |
->setNamespace("success") | |
->addMessage("You've been logged out"); | |
return $this->redirect()->toUrl('/'); | |
// Retrieve message | |
$notice = null; | |
$flash = $this->flashMessenger(); |
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
/** | |
* Server Side | |
*/ | |
var players = []; | |
var count = 0; | |
sails.io.on('connection', function (socket) { | |
var player = {}; | |
socket.on('register', function (uuid) { |
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
$(window).on('keydown', function(event) { | |
if (event.ctrlKey && event.which != 17) { | |
if (event.which == 80) { | |
event.preventDefault(); | |
alert('CTRL + P !'); | |
} | |
} | |
}) |
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 | |
//=> https://github.com/foohey/bar_dump |
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
/* | |
* CSS Editor | |
* Author: robard_m | |
*/ | |
// Page load event | |
window.addEventListener('load', function load(event) { | |
window.removeEventListener('load', load, false); | |
CSSeditor.init(); | |
}); |
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
function test(){ | |
if((document.getElementById('pupupuce').style.height == '0px') && (document.getElementById('acceuilpuce').style.opacity == '0') && (document.getElementById('acceuilpuce1').style.opacity == '0') && (document.getElementById('acceuilpuce2').style.opacity == '0')){ | |
document.getElementById('acceuilpuce').style.opacity = '1'; | |
document.getElementById('acceuilpuce1').style.opacity = '1'; | |
document.getElementById('acceuilpuce2').style.opacity = '1'; | |
document.getElementById('acceuilpuce').style.transitionDuration = '1s'; | |
document.getElementById('acceuilpuce1').style.transitionDuration = '1s'; | |
document.getElementById('acceuilpuce2').style.transitionDuration = '1s'; | |
document.getElementById('pupupuce').style.height = '85px'; | |
document.getElementById('pupupuce').style.transitionDuration = '1s'; |
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
function download(links, id) { | |
setTimeout(function() { | |
link = $(links[id]).attr('href'); | |
id = link.split("id=")[1]; | |
window.location = '/torrents/download/?id=' + id; | |
}, 2000*id); | |
} | |
(function() { | |
links = $("a[href*='/nfo/']"); | |
for (var i = links.length - 1; i >= 0; i--) { |
NewerOlder