Showing posts with label BSD. Show all posts
Showing posts with label BSD. Show all posts

Wednesday, January 27, 2016

Outlying operating systemes

I want to talk about two peices of tech that don't get a lot of attention.

FreeBSD

From my handle you may have gathered that I like BSD. And I do, and it was my favorite. And I got into Mac stuff and I figured since mac has some bsd, kinda sorta that I could keep the handle. And that was, like 8 years ago, if not more. But I have not kept up with the FreeBSD community for a while. It is certainly time to start again.

Systemd is making me nervous about linux. And maybe I should get at least a toe back in that pond. I mean it would make a lot of sense to get something like a Freenas to get back in the hang of it, and slowly expand from there. I want to BSD again.

While browsing /r/UnixPorn the other day I ran into the coolest desktop ever.


By /u/whoibeiz

And at that point I was like, fuck I gotta get back in that community.

TempleOS

TempleOS is an os, it does most the things modern OS's do. It ss writtin by a sole developer Terry A. Davis. He has shizophrenia, and god told him to write it. The most peculiar of God's declarations was that it must run in 640x480 and it can't have networking devices. If not for the networking part I would probably be trying to adapt this system for daily use. No not really...well maybe.

The shell and most of the programming is in a homebrew language called HolyC from the best I can determine.

It's very clear this OS is aspiring to be a Commodore64. While it clearly takes elements from most modern operating systems it, really wants you to write directly to the hardware as much as possible. I think that Terry has a fondness for the Commodore machine, or maybe God does, I don't know I'm not a divine being. I have watched a lot Terry's videos on youtube, and actually recommend you do to, if you can take the random spouts of the n word, that and rambling has gotten Terry kicked off a lot of message boards.

Wednesday, March 9, 2011

Favorite way to regex a file using perl

Sometimes you want to do some magic fu on your file, while it's not loaded in a vim buffer. This is what I use with perl. I know there is probably a way to do this with sed, but I couldn't find it quickly enough. Most of the time when I do a search and replace out side of vim I want to replace something that's already in the file, with itself in a different position. For example:

I want to replace variablewordspace with variablewordtime, so in the file var.txt I have:

variablewordspace
hammerspace

So what I would do is:


cat var.txt | perl -pe 's/(\w+)space/\1time/'

which would give me the output:


variablewordtime
hammertime



For a brief description:
You are display the file var.txt, through the cat command. Then using the pipe (|) you are passing that to perl, with the switches p and e. Switch e allows you to run from the command line without explicitly writing a perl program, while switch p allows you to run a program against every line on standard input, and prints whatever is in $_ after each line. A search and replace using s/// with the search term in the first set of slashes

/(\w+)space/

The parentheses mark that as a group.

The \w+ means any number of word characters, as where the 'space' just represents the word space.

In the last set of slashes is what you want to replace it with.

/\1time/

\1 represents what is in that first set of parenthesis.

And time of course, represents the letters 'time'

Friday, November 14, 2008

Quagga Routing software

Quagga is a really interesting routing software suite that emulates a cisco interface for routing on a *nix box. Now, I am not going to start throwing out my ciscos or anything, but this software seems fairly mature, and considering the cost of a cisco over a cheap computer, with FreeBSD and Quagga on it, I could see a real reason to use it. Quagga is opensource(GPL). So why is this interesting. So why would you care? Well with Quagga being on *nix platforms, you know and love you can do things like run tcpdump, or other tools you are already familiar with. Maybe you need QOS or maybe your room mates torrents are driving you crazy from stealing all the bandwidth. Perhaps you just want to become more familiar with routing, or you want to use a real firewall*.



pf.conf can do routing and nat, all on it's own as well.

Sunday, June 29, 2008

BSD Punk Band

BSD(Burn subvert Destroy) has nothing to do with the operating system, however they do have to do with some kick ass punk. I noticed about 6 months ago when I got a myspace for the blog and saw that http://myspace.com/bsdpunk was taken. I was talking to a friend this morning and remembered them so I cranked it up, because it isn't awkward enough with the new roomies yet that I have to blair punk music on a frickin' Sunday morning. There main myspace page is a bit better. So check out BURN SUBVERT AND DESTROY. Also following them around the intarweb, it looks like I ran into quite an interesting DIY Music site.

Tuesday, March 4, 2008

GPL vs BSD

This debate is in a lot of places.Here is a good one to start with. However if you don't know my opinion read the title of this blog. I like the BSD license because it gives you the choice to be noble.

Monday, February 25, 2008

9unkz0r.com/charity

The charity forum is almost complete and if interested, please register, I don't really expect it to do a lot for the next couple of months, and it is really going on the backburner at this point, but if you guys can build up the community until I have time to focus on it then that would be great too. If you want to be an admin let me know.

In case you didn't know it is a venue to find and donate open source, linux, bsd IT work. Also if you are a company and have a special deal for non profits, you can share that information as well.

Thursday, February 21, 2008

Library of congress

I saw an article on boingboing.net today about how the library of congress was donated a value of 3 million dollars in products and services from Microsoft and in exchange they will have vista kiosks. Link

I was wondering, why isn't there a venue in which non-profits, and government agencies, etc..can ask for help from open source/*nix. I am thinking of opening a forum specifically so that people with the skills who want to donate their time and people who need functioning computers, websites, etc can help each other out. If you guys have an opinion or a better idea for a venue for this I will be opening a forum topic at 9unkz0r.com/forums under the Lounge/ Off topic section.

Thursday, February 14, 2008

Router forum post

There was a forum post about how someone was having problems having to share an internet connection with 5 people. 3 On wireless. If someone was downloading something the speed was unbearable, here was my response:

As far as easy, well that's my style, but networking is. My favorite solution to this is to make a router out of an older box no one is using and at it's very basic throw tcpdump or wireshark on it and just see who is doing this, but you can get so much more sophisticated with it and use the router you built to throttle bandwidth equally(or not so equally if you choose). Smile

Other solutions are:
http://cacti.net/
http://www.openxtra.co.uk/network-manage...en-source/

You could also ARP poison the network. And see who is doing it using cain and abel and wireshark. Here is my tutorial on wireshark:
http://bsdpunk.blogspot.com/2008/01/snif...words.html

Ok so instead of finding this information out you could also work on making the problem less severe, such as reducing the number of people who are on wireless, this will help tremendously as if you are using wifi g for example, every computer connected to the network wirelessly is sharing a portion of 54mb(in your case 3 computers means 18mbs a peice), and when you compound that with possible dropped packets, just cause a cordless phone is on or a microwave or the computers are to close together, that gives you a pretty shitty connection. Also implementing a policy in your living space is going to work a lot better than having a device that shows who is doing what because people can learn how to get around those things. Saying hey we have to live together, let's only do torrents between 1am and 4am and only one person a night gets to do that or something.



So that was the response, I think I may follow up with a tutorial, on exactly how to accomplish a FreeBSD router with throttling. But right now this post is looking about a month away with my current schedule.

Monday, February 11, 2008

FreeBSD, forgot to install ports, DOH!

Ok let's say you did a basic FreeBSD install and you are ready to go. You, of course go to install nmap as your firstapp:
cd /usr/ports

DOH! You forgot to install ports from the cd. That's ok I got you covered.

#mkdir /usr/ports
#portsnap fetch
This downloads a snapshot of the ports
#portsnap extract
exctracts the ports to /usr/ports


Alright, it's that simple.

FreeBSD beggining server set up

Everything you need is in the FreeBSD hand book but not everything in the hand book is something you need, so assuming you have a basic FreeBSD with ports installed. Let's go through the first things you need done after the install. First your going to want to make sure you have connectivity. Ping google.com and see if you have that, if you do you may not need to set up anything for connectivity, but if you don't it is time to crack open the rc.conf.
You can use vi to edit the rc.conf and you need to be root.
vi /etc/rc.conf

add this line for dhcp
ifconfig_fxp0="DHCP"
Replace fxp0 with the name of your network card which can be obtained through a standard ifconfig.
Let's say you want a static IP for your server:
ifconfig_fxp0="inet 192.168.0.2 netmask 255.255.255.0"
Is similar to what you would put in your rc.conf replacing fxp0 again and the ip# and netmask# to match yours.

Next you need to make sure you have a route to the internet:
Add this to your rc.conf:
defaultrouter="10.20.30.1"
You can do this by a command:
# route add default 10.20.30.1


Next you need to make sure that you have name resolution
Make a file /etc/resolv.conf which contains:
nameserver ipofyournameserver
nameserver ipofbackupnameserver
Make sure those are both IP's and not DNS names


****WAIT WAIT***

A little shiznit on rc.conf, rc.conf will only load these settings on restart because rc.conf only exists to set up the settings when the computer is turned on, you can do all of these by command but they won't "stick"

Ok your first port install:
cd /usr/ports/security/nmap
make
And when that is done:
make install
Then you have nmap which is often overyplayed as a hacking tool but it is really a good troubleshooting tool as well, anyway happy hacking.

Saturday, February 2, 2008

Oh yeah 5 points if you decrypt my cisco password

5 points to anyone who cracks, the cisco password on the post before this, and potentially a free BSD Punk shirt if I ever get any made...(get it, FreeBSD shirt). Yeah so I guess I should put like a date limit down in case a shit ton of people crack it, so how about March 1st. And if no one get's it by then, then the winner is the first one to get it.

Tuesday, January 29, 2008

The punk scene, The open source scene, a comparison

Maybe on the top these are to unlikely candidates to compare as an equal, but really the spirit of both is the same. The true spirit is the same, the balls to the walls, diy duct tape and deal with it. I would call them the two biggest scene proponents of diy. The is feeling of animus, a sort of primal scream of "If I can't do it, it can't be done." You have two groups of people innovating when vast amounts of money were required to innovate, and they had none. In the punk scene you have people like Emmerson Lake and Palmer with 7 minute technical solos, the kind of practice and skill to perform these songs requiring vast amount of time to acquire. But suddenly some "punks" would get on stage and thrash about wildly, hit a lot of wrong notes and finish a song under two minutes, and it was almost a joke, but you had a feeling your record collection was obsolete. Now you have programmers, making solutions for free on the same problems software companies are throwing gobs of money at to fix.
Sure both groups have their internal quibbles,did the punk scene start in the US with the Ramones or the UK with the Sex Pistols? GNU or BSD License? But fundamentally the DIY spirit is still there.