Scripts posted recently by jonbaine in Kelpi

1- 10 of 19.

C code to look if the iface is up, using MII.

to C MII interface by jonbaine

/*

    This program is free software; you can redistribute it
    and/or modify it under the terms of the GNU General Public
    License as published by the Free Software Foundation.

Create i386 bootable iso

to iso bootable shell by jonbaine

#Replace <> marked args. with the correct value.
 mkisofs -pad -l -J -v -V "<Name>" -no-emul-boot -boot-load-size 4 -boot-info-table -b < binary -> isolinux boot/isolinux/isolinux.bin> -c <catalog -> isolinux boot/isolinux/boot.cat> -hide-rr-moved -o <DVD.iso -- output iso> -r </tmp/DVD which dir to take>

C++ observer pattern implementation

to C++ observer template by jonbaine

#include <iostream>
#include <iterator>
#include <deque>
// Implementation of the observer pattern
// its implemented in the java way :D

Example of stl::functional

to C++ stl functional by jonbaine

#include <iostream>
//For the pow
#include <math.h>
// stl 
#include <vector>

Generate CTAGS file with etags

to emacs ctags etags by jonbaine

#Generate CTAGS file for emacs / vim use... with exhuberant ctags
etags -R
#:D

simple erlang network programming

to erlang network by jonbaine

-module (ejemplotcp).
-export ([main/0, servidor/0, cliente /0]).
cliente() ->
    SomeHostInNet = "localhost", % to make it runnable on one machine
    {ok, Sock} = gen_tcp:connect(SomeHostInNet, 5678,

erlang simple registered process interaction

to erlang process register by jonbaine

-module(registered).
-export([main/0, ping /0, ping /1]).
ping ()->
    receive
	{ping, Id} ->

hello world in erlang

to erlang hello world by jonbaine

io:format("Hello World!~n",[]).

expect code for automatic remote ssh login and erasing a file

to TCL expect erase remote by jonbaine

#!/usr/bin/expect -f
if {$argc < 4 || $argc > 5} {
   puts "Usage: sshErase <file> <user> <passwd> <ip> <port(optional)>"
   exit
 }

std::ptr_fun && std::remove_copy_if usage example

to C++ std::ptr_fun std::remove_copy_if by jonbaine

#include <iostream>
#include <vector>
class decissor
{
public:
hits counter