$ ruby TheSIGnal.rb ~/untz-untz.ogg # start music deamon
Started as 13561
$ kill -s SIGSTOP 13561 # pause
$ kill -s SIGCONT 13561 # unpause
Note left by Noxn: Not tested because I lack rubygame and dont want it on my vps.
#!/usr/bin/ruby | |
# Made by Noxn. Stoopid. | |
# Arguments: ./filebot server port channel(without #) file | |
require "socket" | |
class Hurr | |
def initialize(host, port, channel, file) | |
@host, @port, @channel, @file = host, port, channel, file | |
raise "File does not exist." unless File.exists?(@file) | |
puts "//File Exists" |
require 'socket' | |
class Lurker | |
def initialize(channel, server, name) | |
@channel, @server, @name = channel, server, name | |
end | |
def connect | |
#Create socket, send ident, name and other stuff. | |
#Connect to channel. | |
end |
require 'socket' | |
class Lurker | |
def initialize(channel, server, port, name) | |
#Make variables we will use. | |
@channel, @server, @port, @name = channel, server, port, name | |
end | |
def connect | |
#Create socket, send ident, name and other stuff. | |
#Connect to channel. |
require 'rubygems' | |
require 'socket' | |
require 'mongo' | |
class Lurker | |
def initialize(channel, server, port, name) | |
#Make variables we will use. | |
@channel, @server, @port, @name = channel, server, port, name | |
end |
require 'rubygems' | |
require 'mini_magick' | |
require 'Win32API' | |
img = MiniMagick::Image.from_file("wallpaper.jpg") | |
#texty = "'Stuff'" | |
texty = "'#{gets.chomp}'" | |
img.combine_options do |c| |
require 'test/unit' | |
TDIR = "#{File.dirname(__FILE__)}" | |
require TDIR+'/lib' | |
require TDIR+'/client' | |
#Tests for lib.rb (Needs a name) | |
# Server.rb and Client.rb are needed for testing. | |
#The lone letters in test names are for order. |
#Just put this at the start: | |
Process.daemon(nochdir=true) #nochdir=true prevents it from changing the directory to / | |
#Code used for testing, with running tail every few moments. | |
3.times do | |
sleep 3 | |
File.open('test', 'a') {|f| f.write("YAY") } | |
end | |
$ ruby TheSIGnal.rb ~/untz-untz.ogg # start music deamon
Started as 13561
$ kill -s SIGSTOP 13561 # pause
$ kill -s SIGCONT 13561 # unpause
Note left by Noxn: Not tested because I lack rubygame and dont want it on my vps.
require 'rubygems' | |
require 'rack' | |
class Object | |
def webapp | |
class << self | |
define_method :call do |env| | |
func, *attrs = env['REQUEST_PATH'].split('/').reject(&:empty?) | |
[200, {}, send(func, *attrs)] | |
end |