×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Comments

top

Bill Gates Patents Detecting, Responding To "Glassholes"

marcello_dl Re:bullshit patent (132 comments)

Unfortunately, patent offices have ample prior art for awarding BS patents.

yesterday
top

Mathematicians Use Mossberg 500 Pump-Action Shotgun To Calculate Pi

marcello_dl Re:So wait, shotguns are more accurate than the bi (307 comments)

This is not math, this is engineering, which is a field I care about even less, yet:

Given the nature of the cubit unit (whose forearms were used? how many people contributed to the measure?) and the way of measuring (how straight was the line of forearms? did they use marks? were they really perpendicular when marking and looking at the marks?....) the results are:
Shotgun Pi = 99.67%
Bible Pi = 80% to 110%, and those who claim that thing approximated Pi to a billion decimal places can't be proven wrong.

OTOH the exact value of Pi in the Bible and the universe collapsing over the mass of an infinitely long book would have been quite a sight.

2 days ago
top

Mathematicians Use Mossberg 500 Pump-Action Shotgun To Calculate Pi

marcello_dl Re:Only in America... (307 comments)

I hate to break it to you, but the ancient term "America" refers to the whole continent, Canada included.

2 days ago
top

Jenny McCarthy: "I Am Not Anti-Vaccine'"

marcello_dl Re:Why do people listen to her? (582 comments)

I am intrigued by your theory and wish to subscribe to her newsletter.

2 days ago
top

Private Keys Stolen Within Hours From Heartbleed OpenSSL Site

marcello_dl Re:https is dead (151 comments)

> But what about sites that don't have any other comms channel with their users?

They never have been secure and they will never be, because an early enough MITM attack renders checksums, certificates, and certificate authorities potentially irrelevant. You got your certificates from the internet or from a preinstalled OS which has likely been vetted by some agency. Your packets travel along thanks to routers with closed source OS. Your cellphone is designed as to permit the modem to do what heartbleed did. And so on.

3 days ago
top

44% of Twitter Users Have Never Tweeted

marcello_dl Re:In other news... (120 comments)

In other news, 100% of facebook users have never booked a face.

3 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> while others are making 'infinite assumptions' when they provide a counterexample

- "15 is a prime number"
- "what about 3x5?"
- "oh yes sry."
The counterexample had the same scope of the assertion, else it's not even definable as example.

In the case of "who created god" two words out of three are undefined, out of their scope. Creation is dependent on the concept of time, time is defined as a property of THIS universe. Thinking that "creating" can be applied to god is plainly a logic trainwreck. Do you use variables out of the scope where they are defined in your programs? Then why do you apply time to a hypothetical god's dimension? Are the conway's game creatures logical when arguing about how many cells make up their supposed god?

Your counterexample sounds like:
"15 is a prime number"
"nope, no green number is prime"
"WTF?"

The assumption must be made infinite times, else:

"who created god?"
"pffft. a god, obviously"
"and who created that other god?"
"pffft. another god, obviously"
"Ah, ok then."

But the first time is already flawed.

3 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> Ironically the only person here who keeps bringing up the word 'proof' is you

And this is a problem, I guess. So if somebody says Dare X and I punch your face! is not implying that a rational discussion about X has been proven impossible. He might want to practice boxing. OK.

About the rest of your post, the assumption vs. assumption is, I say it again, a mere arbitrary choice of words. There is one meaning of assumption vs. another one that can be called assumption but is quite more often called supposition.

- "I borrow mom's car so I will be in time for my appointment"
- "do not assume you will, mom never fills the tank much"
- "well, you are assuming there is not enough gas in the tank, assumption vs. assumption"

Now, if you are thinking that the initial implication borrowing car => arriving in time has not been rendered false, it is not strong anymore, we have a problem. If you think it has, it follows that we agree and the guy punching in the face is wrong as outlined in my very first comment.

3 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

U mad.
There is no premise. There is a counterexample. One guy said one cosmological theory with sound math behind it puts the words GAME OVER to the debate about god, so anybody who brings a god again into the discussion deserves to be punched.
I made an example of a universe without intervention and freedom which is still not godless. I made another more general example in another comment where proving that the universe arises from complete nothingness AND that no other way for the universe to exist is rational, would be a great achievement for science but still not sufficient because the assumption that what is inconceivable for us is meta-inconceivable everywhere, even in the scope of universes' creation.

A counterexample is not an assumption, it is the exploration of a particular case to see whether an assumption somebody else made has any worth. Picking a particular case assumes all other things do not happen, but that is not an assumption because we are not ending up with an implication. If you read my comment like it is a proof, it is your problem.

Whitehead and Copleston sounds like a good name combination for alcohol related products BTW.

4 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

well if the programmer made many of them they would be assumed as the normality and creatures' logic theories would take them into account. Because a theory that does not model their reality would be crazy.

My theory is that if there are twelve socks in the drawer and i take two, twelve remains in the drawer.
It is crazy here.
What if I designed a universe with an "always 12 things in any container" patch? then logic principles would have to be built according to this or they would not model the truth.

4 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> A god would be pointless. Unless, of course, the programmer takes part in the virtual world
OK, let's assume this and follow it to the consequence, which is the absurd that the programmer does not exist at all. Since we are wrong we have made an error somewhere. Easy to spot.
You cannot define the usefulness of a supernatural entity, especially from the inside, even if you have bet succesfully that the concept of "useful" exists at all in the programmer's world, and derive anything by it. If you did, you would have created a metagod called Usefulness and said whatever is supernatural must abide by it. You went beyond religion, you entered metareligion.

If the creatures in the example had been more conservative they might have said it still cannot be ruled out that something supernatural exist, well, that was the entire point of the comment in the context of the story.

4 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

>The atheist is pointing out that there are plenty of assumptions happening either way

An alternative scenario disproving assumptions is not an alternative set of assumptions.
- "I can buy you dinner with these 100 dollars"
- "what if I want dinner on that 300 dollars restaurant?"
- "why couldn't you choose a cheaper one?"
see? it is a cop-out. Atheists say proof, religious men say belief, they have more experience and it shows.

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

Every level of a simulation can have an upper level... provided that "upper", "have", "level" are concepts definable there.

Let's play my favorite one: "if this world needs a creator, the creator's world needs a creator".
Nope. "creator" means guy who does something that result in a creation. Cause -> effect. Wait. Cause and effect need an unidirectional time axis. So you have to assume that one exists in the creator's world. True for the Game of life example. But the atheist's reasoning is that it goes into an infinite loop so you have to assume it in the creator's creator's world, and so on. Logic trainwreck, the "proof" is valid by making infinite assumptions, and fails for gods defined as eternal and creators of all things (so there is no time at all)

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

Eternal is not necessarily "forever". Eternal means also without time, which is more in line with the dimension of a god. What if eternal damnation is final damnation, eternal salvation is final closeness to a god?

But I am substituting a flawed model with another flawed one, let first the problem arise then you can file a complaint. :)

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> this life is quite shitty and yes, I could easily design a better and more just system

You'd fail because you'd set a different arbitrary threshold for injustice, that's all.

The only continuously just system I can conceive is a particle or an equally spaced grid of identical particles at the same mutual distance in all dimensions. Any perturbation would cause injustice. Why that particle has one less neighbour than the rest? UNJUST.

The eventually just system on the other hand can be whatever, it all depends on how it ends up.

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> They are absolutely correct, there is no creator, he doesn't exist inside their universe.

Correct for every creator of abstractions. You are not in the game of chess you are playing, yet no whatsoever move is done without you.

Problem, you have used an "is" defined relatively to the game grid, part of the abstraction, and applied to the creator of the abstraction who is defined as being outside the game, so the creatures have still made a logic error. They applied a concept outside its scope. They would have been more correct, but at the same time more explicit in making their assumptions stand out, by saying: "then, provided that a concept like existence is translatable outside our plane of existence, let's call it meta-existence, the creator does not meta-exist".

Of course the not-strictly-existing god is still potentially able to do all the things ever written in all religious books.

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

I was saying the same thing to a "Scotsman" just the other day.
As we all know no Scotsman was born in Cuba.
Well here was this "Scotsman" born in Cuba.
I said to him,"No true Scotsman is born in Cuba, that makes you a Cuban"
He replied,"Well I was born in Cuba!"
I said,"As I said,'No true Scotsman is born in Cuba'"

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> there is no evidence that he works like that.
I guess not, one guy who promised good things in this life in exchange for worship is shown in matthew 4:8 and is definitely the other guy.

Note also that Jesus doesn't question his ability to provide power and wealth. The problem is that is a bad deal. You basically end up living a life of maintenance of the system which gives you power, and in the end your inevitable demise from this plane of existence will be even more painful.

5 days ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

marcello_dl Re:If you make this a proof of God... (590 comments)

> Given the fact that I use the same logic to make the (in)existence of any God irrelevant to my living, I would actually applaud those game of life beings for coming up to the same conclusion.

They made a logic mistake nonetheless, they could be atheists without doing that.

If the amount of potential interference of a God has any effect on what someone considers right or wrong, we have a problem.

Fear of God means? fearing who is defined as a just judge? hm. if I fear a just judge then I admit I have done something unjust.

Maybe Fear of God means acknowledging a possible supernatural entity? so if i commit a crime I cannot get away with it? Well I should not commit a crime nonetheless regardless of the consequence, if I want to honestly define myself as a just man.

But indeed, Fear of God defined as taking into account a possible supernatural being gives another perspective to all my actions. The main perspective for an ideal good believer, an additional, potentially useful, perspective if you don't believe. And honest atheists end up thinking about god more than believers. Just avoid logic trainwrecks pls.

It is true that some main religion says god has no use for evil people so they will get destroyed, but that is more like revealing a policy than blackmail, especially because permadeath is the default final state in the absence of a god anyway...

> They can't observe me, and unless I start intervening
You'd not be different from some hacker creature who got root, or some creature able to mess with other creatures sensors. There is no way to prove yourself.

5 days ago

Submissions

marcello_dl hasn't submitted any stories.

Journals

top

VNC

marcello_dl marcello_dl writes  |  more than 4 years ago

On remote:
# aptitude install tightvncserver

as the user whose desktop you want to share:

$ vncserver

setup passwords, a screen number is issued, usually 1

on local:

# aptitude install xtightvncviewer

as user

$ xtightvncviewer (remote IP address):1
1 is the screen number

notes: killall Xtightvnc kills it on remote

top

marcello_dl marcello_dl writes  |  more than 4 years ago

First install usb-modeswitch package (debian squeeze - that is, testing at the moment - has it)
Then make sure that the udev initialization is correct:
# Sony Ericsson MD400
#
# This is experimental. Might switch back after some time. Please report!
# This might work too instead; subject to testing
# Vendor:Product id = 0x0fce:0xd0e1
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="d0e1", RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x0fce --default-product 0xd0e1 -O 1"

Then plug the modem in, make sure it doesn't show up as usb disk, then install wvdial.

A working configuration for italian isp wind is the following:

[Dialer Defaults]
Init1 = ATX3
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CFUN=6
Init4 = AT+CGDCONT=1,"ip","internet.wind"
Phone = *99#
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Password = wind
Username = wind

Line init4 must be adapted to your ISP.
It is important to have the init3 line which turns the radio on. 6 means use HSDPA only, other values might be require if you don't have cover or other subscription, but beware the cost and speed. Why does a modem that works only with radio signals need to explicitly turn on its radio is beyond me. Good luck.

top

marcello_dl marcello_dl writes  |  more than 4 years ago

in /etc/udev/rules.d/91-permissions.rules, after first line put:
SUBSYSTEMS=="usb", ATTRS{product}=="xxxx", GROUP="scanner"

Note it is SUBSYSTEMS plural
The correct attr can be seen on dmesg, or udevinfo -a -p /sys/class/usb_device/usbdev5
Optionally put vendor too.

top

marcello_dl marcello_dl writes  |  more than 4 years ago

get http://db.local.clamav.net/main.cvd and http://db.local.clamav.net/daily.cvd

put them in /var/lib/clamav - or use clamscan -d option?

top

marcello_dl marcello_dl writes  |  more than 4 years ago

in the zp-core directory create or edit php.ini with entries like
memory_limit = 256M;
upload_max_filesize = 8M;

top

marcello_dl marcello_dl writes  |  more than 4 years ago

if device=sdb, edit S03mountkernfs.sh

        #CUSTOM ugly hack
            echo 1024 > /sys/block/sdb/device/max_sectors
            echo 1 > /sys/block/sdb/device/scsi_disk/*/allow_restart

top

marcello_dl marcello_dl writes  |  more than 5 years ago

First of all, aptitude-upgrading, the debian image still has the random number gen. vulnerability. I went for lenny so i have a recent git and postgresql 8.3

Did tzsetup, and aptitude installed locales
added a normal user

Linode configures with DHCP his servers. Might have advantages but i prefer a static one

iface eth0old inet dhcp

iface eth0 inet static
        address (...)
        netmask 255.255.255.0
        gateway (...)
        dns-nameservers 207.192.69.4 207.192.69.5

and put a name in /etc/hostname

Then installed arno-iptables-firewall.
Opened ports 80 443 (it's gonna be a server)
FULL_ACCESS_HOSTS="(my machine domain name)"
FIREWALL_LOG=/var/log/firewall
LOGLEVEL=debug

then
touch /var/log/firewall

in /etc/syslog.conf kern.* must be changed to kern.!=debug
and the following added:
      # Logging for iptables
      kern.=debug -/var/log/firewall

then /etc/init.d/sysklogd restart

and restart arno firewall

To prevent firewall messages on lish console out add to /etc/init.d/klogd:

KLOGD="-c 4"

And restart that one too.

Better use logrotate too, see
http://linuxgazette.net/114/keeling.html

in /etc/logrotate/logrotate.d /var/log/firewall {
                      rotate 7
                      daily
                      compress
                      notifempty
                      create 0640 root adm
                      delaycompress
                      create
}

and start logrotate to see if it kinda works /usr/sbin/logrotate /etc/logrotate.conf

Rails server:
installed exim4-daemon-light postgresql lighttpd ruby ruby1.8-dev irb liberb-ruby libpgsql-ruby1.8 libredcloth-ruby1.8 rdoc1.8 libfcgi-ruby1.8 rubygems rake

then:
gem install rails
(wait)

make sure the correct version for your app is present, too
gem install -v=2.0.2 rails

Postgres users need postgres gem
aptitude install postgresql-server-dev-(version) make

gem install postgres

lighty-enable-module to add fastcgi and ssl
but then removed the entries in conf-enabled dir


# Debian lighttpd configuration file
#

############ Options you really have to take care of ####################

## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory

server.modules = (
        "mod_fastcgi",
                        "mod_access",
                        "mod_alias",
                        "mod_accesslog",
                        "mod_compress",
                      "mod_rewrite",
# "mod_redirect",
# "mod_evhost",
# "mod_usertrack",
# "mod_rrdtool",
# "mod_webdav",
                      "mod_expire",
# "mod_flv_streaming",
# "mod_evasive"
)

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/var/www/"

## where to upload files to, purged daily.
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )

## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"

## files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
                                                              "index.htm", "default.htm",
                                                              "index.lighttpd.html" )

## Use the "Content-Type" extended attribute to obtain mime type if possible
# mimetype.use-xattr = "enable"

#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## Use ipv6 only if available.
#include_shell "/usr/share/lighttpd/use-ipv6.pl"

## bind to port (default: 80)
# server.port = 81

## bind to localhost only (default: all interfaces)
server.bind = "(server's IP)"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"

##
## Format: .html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/var/www/"

## virtual directory listings
dir-listing.encoding = "utf-8"
server.dir-listing = "disable"

## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to (default: don't care)
server.username = "www-data"

## change uid to (default: don't care)
server.groupname = "www-data"

#### compress module
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")

#### url handling modules (rewrite, redirect, access)
# url.rewrite = ( "^/$" => "/server-status" )
# url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"

#### expire module
# expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

## load enabled configuration files,
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

#### handle Debian Policy Manual, Section 11.5. urls
## by default allow them only from localhost
## (This must come last due to #445459)
## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't
$HTTP["remoteip"] =~ "127.0.0.1" {
        alias.url += (
                "/doc/" => "/usr/share/doc/",
                "/images/" => "/usr/share/images/"
        )
        $HTTP["url"] =~ "^/doc/|^/images/" {
                dir-listing.activate = "enable"
        }
}

# lighttpd.conf entry to transparently add ssl
#$SERVER["socket"] == "(your server's IP):443" {
# ssl.pemfile = "/var/www/ ... /key-cert.pem"
# ssl.ca-file = "/var/www/ ... /cacert.pem"
# ssl.engine = "enable"
#}

$HTTP["host"] =~ "(^|\.)hostname$" {

server.error-handler-404 = "/dispatch.fcgi"
server.document-root = "/var/www/ railsapp /public/"

server.errorlog = "/var/www//log/lighttpd.error.log"
accesslog.filename = "/var/www/ railsapp /log/lighttpd.access.log"

url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )

compress.filetype = ( "text/plain", "text/html", "text/css", "text/javascript" )
compress.cache-dir = "/var/www/ railsapp /tmp/cache"
expire.url = ( "/favicon.ico" => "access 3 days",
                                                          "/images/" => "access 3 days",
                                                          "/stylesheets/" => "access 3 days",
                                                          "/javascripts/" => "access 3 days" )

fastcgi.server = ( ".fcgi" => ( "localhost" => (
    "min-procs" => 1,
    "max-procs" => 1,
    "socket" => "/var/www/ railsapp /tmp/sockets/fcgi.socket",
    "bin-path" => "/var/www/ railsapp /public/dispatch.fcgi",
    "bin-environment" => ( "RAILS_ENV" => "production" )
) ) )

}

Postgresql
# su - postgres
now, a user same name of your linux user who own the app
$ createuser (username) -P (give him no special privileges)
$ createdb -E UTF8 (dbname)

edit pg_hba.conf (somewhere in /etc/postgresql/...)
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#
host (dbname) (www-data = username) 127.0.0.1 255.255.255.255 trust

Tried copying the rails app(s) to /var/www and work under user www-data

to make changes effective restart postgresql and lighttpd

top

marcello_dl marcello_dl writes  |  more than 5 years ago

fstab line: //edmini/share /mnt/smb cifs noauto,user=[user],domain=[domain name],ip=xxx.xxx.xxx.xxx 0 0

top

marcello_dl marcello_dl writes  |  more than 5 years ago

Note, this procedure involves some downtime for the server.
First dump existing databases, e.g.

# su - postgres -c 'pg_dump -C my_database > /tmp/my_database.sql'

If you have user putting content into database this step could be done later, just before importing the sql in the new cluster. Remember to take down db clients if you care for db consistency.

Then install new version, e.g.

# aptitude install postgresql-8.3

when one installs a new version of postgres under debian, the old version stays installed and a new cluster is automatically created. The new version server is configured for an alternative port (5433). Watch for the messages/logs from the package manager.

Then import old users into the new cluster, take into account the listening port run the updated client as the bash command "psql" defaults to the old version.

# su - postgres
# createuser a_user --port 5433

Then copy or update the pg_hba.conf settings to the one in the new cluster in /etc/postgresql/8.3/main/pg_hba.conf

Do not forget to reload the settings.
# /etc/init.d/postgresql-8.3 reload

Then import the databases
# su - postgres
$ /usr/lib/postgresql/8.3/bin/psql --port 5433

Then configure the new server for the existing server port, e.g.
# /etc/init.d/postgresql-8.3 stop
edit /etc/postgresql/8.3/main/postgresql.conf:
    port=5432

Then stop the db clients (eg. it's downtime for my dynamic sites hosted with lighttpd), take down old db, take up new one, restart db clients /etc/init.d/lighttpd stop /etc/init.d/postgresql-8.2 stop /etc/init.d/postgresql-8.3 start
    netstat -nat /etc/init.d/lighttpd start

test the db clients (restart your browser for webapps to avoid using stale session data), if all is well we must remove old postgresql else at reboot it is restarted, conflicting with the newest server version.

Since the debian remove scripts assume the server is up we must take the old server back up- we need to configure the old server for an alternative port so both versions can be up at the same time, e.g.

edit /etc/postgresql/8.3/main/postgresql.conf:
    port=5434

# /etc/init.d/postgresql-8.2 start
# aptitude purge postgresql-8.2

This is all.
Note. It is better to upgrade incrementally than doing it say, from 8.1 to 8.3
There might be ways to reduce downtime, with WAL for example.

top

marcello_dl marcello_dl writes  |  more than 6 years ago

apt-get install sqlite3 libsqlite3-dev
gem install sqlite3-ruby
of course all ruby dev and rails stuff must be already installed

gem install typo /to be continued
    517 mkdir blog
    518 cd blog/
    519 typo config .
    520 typo config . database=postgresql
    521 ls
    522 ls -a
    523 typo install --help
    524 rm ./* -rf
    525 typo install .
    526 typo stop .
    527 cat installer/lighttpd.conf.example
    528 typo config . database=postgresql
    529 typo config . web-server=external
    530 nano config/database.yml
    531 echo edit pg_hba.conf
    532 echo createdb typo -E UTF8
    533 rake db:migrate
    534 nano config/database.yml
    535 cp ../GaraTiro/config/database.yml config/database.yml
    536 nano config/database.yml
    537 rake db:migrate
    538 echo edit lighttpd.conf
    539 echo "$HTTP["host"] =~ "typo.jasonhoffman.org" {
server.document-root = "/home/jah/apps/typo/trunk/public/"
server.error-handler-404 = "/dispatch.fcgi"
server.indexfiles = ( "dispatch.fcgi")
server.errorlog = "/home/jah/logs/error.typo.log"
    fastcgi.server = ( ".fcgi" =>
          ( "localhost" =>
              ( "socket" => "/home/jah/tmp/typo-jah.socket",
                                                        "min-procs" => 2,
                                                        "max-procs" => 2,
                  "bin-path" => "/home/jah/apps/typo/trunk/public/dispatch.fcgi",
                  "bin-environment" => ( "RAILS_ENV" => "production" )
    )))
}
"
    540 ls
    541 ls log/
    542 touch log/lighttpd.error.log
    543 typo config . port=80
    544 typo config . rails-environment=development
    545 typo config .
    546 chown marcello:www-data .
    547 #change lighttpd user as same as app

top

marcello_dl marcello_dl writes  |  more than 6 years ago

As root:

edit /etc/X11/xorg.conf

If no extensions section add one, see below. Add the option anyway.

Section "Extensions"
                Option "Composite" "Enable"
EndSection

and in Section Devices add

        Option "XAANoOffscreenPixmaps" "true"

add to /etc/apt/sources.list
#compiz
deb http://download.tuxfamily.org/osrdebian unstable compiz-fusion-git

download the pgp key
wget http://download.tuxfamily.org/osrdebian/61B8DB62.gpg -O- | apt-key add -

install:

apt-get remove --purge compiz*
aptitude dist-upgrade
apt-get install -t unstable compiz-core compiz-gnome compizconfig-settings-manager compiz-fusion-plugins*

maybe it is needed the following too:
aptitude install 915resolution

As the logged in user, with the graphical desktop already running:
SKIP_CHECKS=yes compiz --replace

One can also install emerald and emerald-themes, possibly purging and reinstalling at every update.

top

marcello_dl marcello_dl writes  |  more than 6 years ago

Verify you have the modules (recent 2.6 kernel needed stock lenny works)
modprobe -v udf
modprobe -v pktcdvd

aptitude install udftools
put your cdrom device in /etc/default/udftools
e.g. dev/hdX /etc/init.d/udftools restart

cdrwtool -d /dev/hda -q for a cdrw
dvd+rw-format /dev/hdd
and mkudffs /dev/hdd for dvd+rw

mount -t udf -o noauto,noatime,sync,rw,users /dev/pktcdvd/0 /mnt/

Now root is able to write on device, adjust permissions.

top

marcello_dl marcello_dl writes  |  more than 6 years ago

A spare laptop with no working cdrom and seemingly unable to boot from usb... but with a realtek boot agent. So it's netboot time. Another option is using wuby and install ubuntu right on the ntfs partition along with windows, but then you're back to square one if something happens to the windows installation.

On a debian box used as server:
aptitude install tftpd-hpa dhcp3-server
if you have another dhcp server installed skip dhcp3-server but you have to find the proper config yourself.

edit /etc/default/tftpd-hpa

RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"

from your fave debian mirror in dists/etch/main/installer-i386/current/images/netboot/

downloaded netboot.tar.gz, expanded it in /var/lib/tftpboot

For /etc/dhcp3/dhcpd.conf let's assume the tftpd box is in 192.168.0.1, I have to specify "filename" and "next-server" options- all other options depend on your subnet:

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.5 192.168.0.15;
        filename "pxelinux.0";
        next-server 192.168.0.1;
    option subnet-mask 255.255.255.0;
    option routers 192.168.0.1;
    option broadcast-address 192.168.0.255;
    option domain-name-servers [ put here DNS addresses, space separated];
}

Then restart the services to make changes effective /etc/init.d/tftpd-hpa restart /etc/init.d/dhcp3-server restart

Make sure machines on the subnet can freely access the net to download packages, else the installation won't be very straightforward.

On the box that needs the reinstall chose net boot (usually selectable in the bios and or among boot options menu).

If all goes well the debian boot installer prompt should appear. Only after installation is complete you can stop tftpd server.

BTW on the laptop HAL had to ignore the broken device: put this in /etc/hal/fdi/preprobe , as this blog entry says

<?xml version="1.0" encoding="UTF-8">
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/[DEVICE]">
<merge key="info.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>

top

marcello_dl marcello_dl writes  |  more than 6 years ago

I already had the setup for 802.11b with my home lan

Note this setup is quite sub-optimal as the password is saved in plaintext
The wext driver is for recent 2.6 kernels, works for my ndiswrapper

add to /etc/network/interfaces:

iface wlan0 inet dhcp
                wpa-driver wext
                wpa-ssid "ZyXEL XXXYYY"
                wpa-psk [password plaintext]
# wpa-bssid 00:1a:2b:3c:4d:5e -> not necessary but likely safer
                wpa-key-mgmt WPA-PSK
                wpa-pairwise TKIP CCMP
                wpa-group TKIP CCMP
                wpa-proto WPA RSN

top

marcello_dl marcello_dl writes  |  more than 6 years ago

while git-svnimport can be used for proper subversion repositories, I had issues with it and a personal svn repository which didn't follow the traditional svn layout with trunk branches tags (shame on me). Well why not simply iterate over the revisions and importing them? Seems to work. Here's how I did it:

first run
svn info [URL of the svn repository you want to migrate]
to discover how many revisions it has till now.

then let's get the commit messages so we can recycle them:

for i in `seq 1 [number of revisions]`; do svn log -r $i [URL of svn repository] > /tmp/svnlog$i.txt; done

then:
svn co --revision 1 [path to the svn repository you want to migrate]
so that a dir with a working copy is created, we'll call it [target git repository]. Now let's migrate all changes:


cd [target git repository]/
git-init
echo *.svn >> .git/info/exclude
for i in `seq 1 [number of revisions]`; do cd .. ; svn co --revision=$i [URL of source svn repository] ; cd $OLDPWD ; git add . ; git-commit -a -F /tmp/svnlog$i.txt; done

That should do it. Better do a
git-gc --prune --aggressive
(Do it when nobody else is accessing the new git repository!!!) so that you save space on disk, and a
git clean -d
to get rid of now useless .svn dirs.

top

marcello_dl marcello_dl writes  |  more than 6 years ago

The cam (an old trust spycam 300) worked under ekiga or gqcam without problems, once the proper stv680 kernel module is installed.

for mplayer one must use the v4l driver specifying outfmt width and height, like this example

mplayer tv:// -tv driver=v4l:device=/dev/video1:outfmt=bgr24:width=320:height=240

Well the pic is upside down, can use -flip option or dunno turn the webcam upside down :)

"webcam" package is quite useful as a poor man cctv. here's a sample config

[ftp]
host = localhost
user = nobody
pass = xxxxxx
dir = /tmp
file = webcam.jpg
tmp = imageup.jpg
local = 1

[grab]
device = /dev/video1
width = 320
height = 240
delay = 1
wait= 1
norm = pal
quality = 75
trigger = 0

For complex stuff zoneminder.com ought to be the choice.

top

marcello_dl marcello_dl writes  |  more than 6 years ago

Nota: lascio libero chiunque di copiare modificare e riutilizzare il seguente articolo, che rilascio nel pubblico dominio. E' probabile che sul sito del produttore (www.empiremedia.it) si trovino ulteriori informazioni.

La usb pen mi funziona subito come analogico, dopo un po' funziona anche la parte digitale. Presumo sia una questione di caricare il firmware piu' adatto (v. sotto) o di aspettare che il driver maturi.

Per avere a disposizione la usb pen sotto linux bisogna compilarsi i moduli relativi. Quello disponibile con il kernel di etch non la riconosce.

Ho seguito le istruzioni in inglese su
http://www.marcushellberg.com/pages/projects/digital-tv-in-linux.php

Se non lo si sa, scoprire con
    uname -r
quale versione del kernel si sta usando, nel mio caso
    2.6.18-4-686

Usare questa informazione per scaricare la versione giusta degli headers:
    aptitude install mercurial linux-headers-2.6.18-4-686 build-essential

Fare copia di sicurezza dei moduli attualmente installati, casomai qualcosa andasse storto

    tar zcvf modulesbackup.tgz -C /lib/modules/ 2.6.18-4-686/

Scaricarsi e installare i moduli aggiornati usando mercurial

    mkdir dvbdriver
    cd dvbdriver/
    hg clone http://mcentral.de/hg/~mrec/v4l-dvb-kernel
    cd v4l-dvb-kernel/v4l/
    make
    sudo make install

Scaricarsi il firmware dal sito http://konstantin.filtschew.de/v4l-firmware/ (non va aggiornato il firmware della penna, va solo scaricato, viene usato dal modulo), a me va anche la versione 4, teoricamente andrebbe la versione 3.

una volta scaricato, scompattarlo in /lib/firmware, es:

    tar xvzf firmware_v4.tgz -C /lib/firmware/

a questo punto riavviare il PC inserendo la usb pen: i messaggi, ottenibili anche col comando dmsg, dovrebbero annunciare che la penna e' riconosciuta ed i moduli relativi caricati, ad esempio:

(...)
em28xx v4l2 driver version 0.0.1 loaded
em28xx new video device (eb1a:e310): interface 0, class 255
em28xx: device is attached to a USB 2.0 bus
em28xx: you're using the experimental/unstable tree from mcentral.de
em28xx: there's also a stable tree available but which is limited to
em28xx: linux =2.6.19.2
em28xx: it's fine to use this driver but keep in mind that it will move
em28xx: to http://mcentral.de/hg/~mrec/v4l-dvb-kernel as soon as it's
em28xx: proved to be stable
em28xx #0: Alternate settings: 8
(...)
EEPROM ID= 0x9567eb1a
Vendor/Product ID= eb1a:e310
AC97 audio (5 sample rates)
500mA max power
Table at 0x04, strings=0x226a, 0x0000, 0x0000
tuner 0-0061: chip found @ 0xc2 (em28xx #0)
attach inform (default): detected I2C address c2 /root/dvbdriver/v4l-dvb-kernel/v4l/tuner-core.c: setting tuner callback
tuner 0x61: Configuration acknowledged /root/dvbdriver/v4l-dvb-kernel/v4l/tuner-core.c: setting tuner callback /root/dvbdriver/v4l-dvb-kernel/v4l/xc3028-tuner.c: attach request! /root/dvbdriver/v4l-dvb-kernel/v4l/tuner-core.c: xc3028 tuner successfully loaded
attach_inform: tvp5150 detected.
cs: IO port probe 0x100-0x3af: clean.
cs: IO port probe 0x3e0-0x4ff: clean.
cs: IO port probe 0x820-0x8ff: clean.
cs: IO port probe 0xc00-0xcf7: clean.
cs: IO port probe 0xa00-0xaff: clean.
tvp5150 0-005c: tvp5150am1 detected.
Loading base firmware: xc3028_init0.i2c.fw
Loading default analogue TV settings: xc3028_BG_PAL_A2_A.i2c.fw
xc3028-tuner.c: firmware 2.7
ANALOG TV REQUEST
em28xx #0: V4L2 VBI device registered as /dev/vbi0
em28xx #0: V4L2 device registered as /dev/video0
em28xx #0: Found MSI DigiVox A/D
em28xx audio device (eb1a:e310): interface 1, class 1
em28xx audio device (eb1a:e310): interface 2, class 1
usbcore: registered new driver em28xx
usbcore: registered new driver snd-usb-audio
em2880-dvb.c: DVB Init
Loading base firmware: xc3028_8MHz_init0.i2c.fw
Loading default dtv settings: xc3028_DTV8_2633.i2c.fw
xc3028-tuner.c: firmware 2.7
Sending extra call for Digital TV! /root/dvbdriver/v4l-dvb-kernel/v4l/xc3028-tuner.c: attach request!
DVB: registering new adapter (em2880 DVB-T)
DVB: registering frontend 0 (Zarlink ZL10353 DVB-T)...
Em28xx: Initialized (Em2880 DVB Extension) extension
(...)

Per vedere se c'e' l'audio della TV:

arecord -l

  (...)
  card 1: Device [USB 2881 Device], device 0: USB Audio [USB Audio]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

Si può regolare il volume con:

  alsamixer -c 1

premendo tab per scegliere l' input screen

A questo punto la scheda e' pronta, usando ad esempio mplayer, dopo aver verificato che mplayer funzioni con un file video (scelta del -vo adatto, verifica dei permessi per sentire l'audio ecc), per vedere la tv si usa

mplayer -vo xv tv:// -tv chanlist=italy:driver=v4l2:input=0:norm=2:device=/dev/video0:alsa=yes:audiorate=48000:amode=0:forceaudio=yes:adevice=hw.1,0:volume=80:immediatemode=0

(attenzione, inserire tutto su una riga e da chanlist= in poi senza spazi, in caso di dubbi vedersi l'help di mplayer- c'e' anche in italiano)

e usare h e k per provare tutti i canali fino a trovare qualche emittente.

Dopo qualche minuto di ricezione segnale analogico che a quanto pare sblocca la situazione, si puo' provare con il digitale. Consiglio di installare kaffeine, che ha una funzione di scansione canali. L'antennina in dotazione non ha fatto molto per me, collegando all'impianto antenna di casa (n.b. mai adattato al digitale terrestre) invece spuntano i canali, se la zona è servita.

Kaffeine permette di fare pausa del segnale video, registrarlo in mpeg2 (serve spazio su disco), e a quanto mi pare registrare un canale e vederne un'altro purche' appartenga allo stesso "stream".

Una stranezza, appena avviato kaffeine il segnale e' piu' debole, cambiando canale un po' la ricezione migliora. Ritengo sia qualche problema con i comandi dati al sintonizzatore.

Per la tv analogica riesco con mplayer a registrare in divx a 2000kbit e qualche filtro per incrementare la qualita' con un celeron a 1.7 giga. Registrando in mpeg2 o salvando direttamente lo stream (mai provato) si ha minor consumo di cpu e lievemente maggior qualità a scapito della dimensione del file.

Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...