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
// Spawn harvester | |
Game.spawns.Spawn_1.spawnCreep([WORK, CARRY, MOVE], `Harvester_${Game.time}`, {memory: {role: 'harvester'}}); | |
// Loop has issues. | |
// If spawn is full, harvester will stop. | |
module.exports.loop = function () { | |
const creep1 = Game.creeps['Harvester{Game.time}']; | |
if (creep1.carry[RESOURCE_ENERGY] === creep1.carryCapacity) { | |
console.log(`${creep1.name} is full`); |
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 links = document.querySelectorAll('.srg .g h3 a'); var urls = []; [].forEach.call(links, function(link) { urls.push(link.href.indexOf('google') === -1 ? link.href : link.getAttribute('data-href')) }); prompt('URL', urls.join('\n')); |
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
Ning inurl:profiles/blog/list -inurl:ning.com |
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
local storyboard = require( "storyboard" ) | |
local physics = require( "physics" ) | |
local scene = storyboard.newScene( "game" ) | |
local box | |
local ground | |
function scene:createScene( event ) | |
local group = self.view |
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
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install php5-cli php5-common php5-fpm |
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
Error message: | |
The following SSH command responded with a non-zero exit status. | |
Vagrant assumes that this means the command failed! | |
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrant | |
Stdout from the command: | |
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
Show hidden characters
{ | |
"font_size": 11, | |
"translate_tabs_to_spaces": true, | |
"highlight_line": true, | |
"line_padding_top": 4, | |
"line_padding_bottom": 4, | |
"trim_trailing_white_space_on_save": true, | |
"ensure_newline_at_eof_on_save": true | |
} |
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 | |
$timezone = new DateTimeZone('Europe/Brussels'); | |
$age = DateTime::createFromFormat('Y-m-d H:i:s', '1990-09-12 00:00:00', $timezone) | |
->diff(new DateTime('now', $timezone)) | |
->y; | |
return $age; |