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 names = ['Juhan', 'Mikk', 'Tuuli', 'Oskar']; | |
var newList = []; | |
function welcome(name, callback) { | |
name += ', hello'; | |
console.log(name); | |
newList.push(name); | |
callback(null, name); | |
} |
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 fs = require('fs'); | |
var readStream = fs.ReadStream('/dev/psaux'); | |
var mouseMovements = []; | |
readStream.on('data', function(packet) { | |
var buf = packet.readInt8(0); | |
var mouse = { | |
leftBtn: !!(buf & 1) |
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 Random = { | |
/** | |
* Numbers between ~( -2 to 2 ) | |
* http://stackoverflow.com/questions/75677/converting-a-uniform-distribution-to-a-normal-distribution | |
* http://c-faq.com/lib/gaussian.html | |
*/ | |
gaussian: function() { | |
var x1, x2, r; |
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 | |
download_page='http://links.powerbot.org/download' | |
referer='http://powerbot.org' | |
filename='RSBot.jar' | |
curl -GL -e $referer -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" -o $filename $download_page | |
# Well you could also add the line to add the line for start the bot after download | |
# java -jar $filename |
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
find . -type f -name "*.java" -exec wc -l {} \; | awk '{total += $1} END{print total}' |
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
package org.jurka.fishing; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Point; | |
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.Set; | |
import org.powerbot.concurrent.Task; |
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
package org.jurka.fighting; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Point; | |
import org.powerbot.concurrent.Task; | |
import org.powerbot.concurrent.strategy.Condition; | |
import org.powerbot.concurrent.strategy.Strategy; | |
import org.powerbot.game.api.ActiveScript; |
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 net = require('net') | |
, util = require('util') | |
, exec = require('child_process').exec; | |
var options = { | |
PORT: 6667 | |
, HOST: 'irc.freenode.net' | |
, NICK: 'Miska' | |
, CHANNELS: [ '#node.js', '#javascript', '#randomChan' ] | |
, USER: { |
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
//first, checks if it isn't implemented yet | |
if (!String.prototype.format) { | |
String.prototype.format = function() { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] | |
: match | |
; | |
}); |
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 sum(a, b, cb) { | |
return process.nextTick(function() { | |
return cb(null, a + b); | |
}); | |
} | |
sum(32, 43, function(err, res) { | |
console.log(res); | |
}); |
OlderNewer