Tuesday, July 17, 2012

So it's summer in Japan and teaching at the schools pretty much suck during Summer and Winter...the main reason => NO CENTRAL AIR!! Right now you're literally sweating all over and pretty much thru your clothes. In the winter it's pretty much the opposite, you're freezing your ass off...but since it's summer I decided to make my own little Y U NO poster...


For the love of God, Japan...get central air at the schools!!!!

Thursday, July 5, 2012

Firefox crashing with html5 and flash...possible fix

So Firefox has been crashing a lot when viewing html5 on youtube, etc. If I just watch the files in the non-full screen mode it's okay but if I do anything that changes...such as seek to a different point in the video or maximize the screen it just crashes.

Well for some reason the new firefox (13.0.1 is the one I have) or maybe even the older version, I'm not sure which, added me to the html5 trial on youtube automatically!!! I just left the html5 testing (click on "leave the html5 trial" @ youtube.com/html5) and now all the vids are back to "normal" =D and I have full screen back!!!

Damn you Adobe! fix this already! I would like to see it in html5 but this crashing has got to stop.

Sunday, April 22, 2012

Bypassing (layer 7) firewalls with proxytunnel and ssh over https/ssl

The whole thing is written out all over the internet.
The site I used was HERE.
And it worked after I made a few adjustments and assuming you patched apache2 to accept a CONNECT thru SSL.

To patch apache...You will need to download the source and install this patch.

1. SU to root since it's easier than sudoing everything and it's less likely to run into issues.
cd /usr/src
2. get the dependencies and download the source.
apt-get build-dep apache2; apt-get source apache2
3. extract the source file.
dpkg-source -x apache2_2.2.16-6+squeeze7.dsc
4. apply the patch (e.g. patch -p0<patch)
5. cd into the apache directory if you're not in there already.
cd apache2-2.2.16
6. build the package and install.
dpkg-buildpackage -b && dpkg -i *.deb

Then you need to set up apache.
I have several virtual hosts set up on apache so I decided that I wanted to make this on a vhost also. What I did was make an entry to add a vhost just for ssh over ssl.

This is what my add "looks" like...ssh.server.org is an example, change it to yours. First I forced ssl usage

/etc/apache2/sites-available/vhost1-sslproxy80

<VirtualHost *:80>
ServerName ssh.server.org
ErrorLog /var/log/apache2/ssh-on-ssl-error.log
Loglevel warn
Redirect 301 / https://ssh.server.org
</VirtualHost>


` then to /etc/apache2/sites-available/vhost1-sslproxy443

<IfModule mod_proxy.c>
<VirtualHost *:443>
ServerAdmin http@localhost
ServerName ssh.server.org
DocumentRoot /var/www/ssh-ssl
ServerSignature off
CustomLog /var/log/apache2/ssh-on-ssl.log combined
Errorlog /var/log/apache2/ssh-on-ssl-error.log
<Directory /var/www/ssh-ssl>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# THIS IS THE CONFIG NEEDED FOR OUR TUNNELLING
# Allow proxy connect (forward-proxy) on port 22 (SSH)
ProxyRequests on
AllowCONNECT 22
ProxyVia on
# Deny all proxying by default...

Order deny,allow
Deny from all
Allow from localhost
Allow from any.local.ip
Allow from any.local.ip.hostname.belonging.to.the.server
Allow from anyother.ip.hostname.you.want.to.allow.connect.from

# END OF TUNNELLING CONFIG
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
SSLEngine On
SSLproxyengine on
</VirtualHost>
</IfModule>


Then enable the 2 sites using a2ensite
a2ensite vhost1-sslproxy80 vhost1-sslproxy443

This next part is the part that made me lose a few hairs since it kept saying "405 method not allowed" and the fix is that you MUST put your vhost name in the /etc/hosts file!!!

Add a line to /etc/hosts
127.0.0.1 ssh.server.org
assuming that you have a public fqdn or dynamic hostname. (FYI I use no-ip.org)

Then check if apache is started.
If all is good then try her out.

Sunday, February 19, 2012

Debian Squeeze 3.2 kernel update

I've been meaning to upgrade my kernel to the new 3.X but don't want to spend half my day going thru the options...so I installed the squeeze-backports version. Change the image and header file to fit your cpu and version. I added the headers, you don't have to.

1. Update your /etc/apt/sources.list to include the backports
deb http://backports.debian.org/debian-backports squeeze-backports main non-free contrib

2. sudo apt-get update

3. sudo apt-get -t squeeze-backports install linux-image-3.2.0-0.bpo.1-686-pae linux-headers-3.2.0-0.bpo.1-686-pae
...or linux-image-3.2.0-0.bpo.1-amd64 if you have that :)

4. say yes if you're sure you want to add the additional packages.

5. don't walk away...you need to press the OK button for something and quit a section on non-free stuff.

6. reboot and hopefully you'll have a new list in grub and then boot'er up! wheeeeeeeeze!

Thursday, February 16, 2012

Changing mp3 file bpm/tempo for use with Mixxx to reduce slowing/bogging/sluggishness

Just had a good idea of minimizing cpu usage while using Mixxx. The best idea I came up with was to resample the mp3 to increase/decrease the tempo (w/o affecting pitch).

sox original.mp3 newfile.changedBPM.mp3 tempo 1.025

This will give it an increase of 2.5% where 1.1 would give 10%. and the opposite is 0.9 would give -10%.

However if you want the pitch to change as well, just replace tempo with speed. Now instead of Mixxx dealing with the BPM change and slowing things down, just get the files as close as possible to each other and play DJ w/o the slow down.

I use a netbook so it's not that powerful and whenever I hit the "key" option to keep the same pitch and do a sync to beatmatch...all hell breaks loose and I get random sluggishness. So by changing the files beforehand, this should reduce the calculations needed by Mixxx. Haven't tried it yet as I'm at work but crossing fingers!

[solved] Behringer UCA202 low volume issue on computer speakers

So I bought one after hearing some reviews and finding out that it's compatible with Mixxx. However I was a bit disappointed when I connected the RCA output to my RCA input on my computer speakers. The volume was very low and I had to crank it up and the gain to hear anything. Then I read online how you need a preamp to get any usable volume.
But recently I bought an RCA to 1/8" phone jack Y-cable to connect [edit] from the Behringer's RCA outputs to my PC speakers' 1/8" inputs [end edit] and lo and behold the volume was fine! The line level volume was perfect and more importantly usable! No need for any extra equipment. Hope this helps you out!

Happy DJ'ing!

Tuesday, February 7, 2012

Binaural beats generation using soX

So yeah anyways if you don't know what this is...google or wiki it.

anywho...long story super short...here is a good one I've found for Alpha waves. Using 90 hz in one ear and sweeping from 93-103 hz in the other...

play -n synth 420:00 sin 90 sin 93-103

this is good for 7hours. Change the 420:00 to whatever length of time you desire.

to output it to an mp3 file...

sox -n 7hr.sleep.mp3 synth 420:00 sin 90 sin 93-103

if you get the MP3 not support not compiled, see previous entry to get it supported and working (Debian squeeze instructions tho).

just for kicks, here's how to get the starship Enterprise sound using sox...

play -n -c2 synth whitenoise lowpass -1 130 lowpass -1 130 lowpass -1 130 tremolo 4 gain 14

more variations can be found here. There were a lot of comments that the sound didn't have a pulsing beat so I added tremolo to the code and it did the trick. I like it at 4 but if you want to slow it down a bit try 2 and to speed it up go higher. Beyond 9 it's hard to tell.

Monday, February 6, 2012

Debian squeeze, sox w/ mp3 support

UPDATE April 19, 2021
So the original post was relevant to Debian Squeeze and Jessie but now that I finally updated to Buster, it is no longer relevant. Just need a single command and mp3 is set to go.
apt-get install libsox-fmt-mp3
-------------End update--------------
Original post:

So went about getting mp3 support on my soX since it is a "non-free" codec...found this link...but it was slightly outdated but was corrected in the comments section.

So basically this is putting the steps all in one ;D ...

note: I recommend doing this as root instead of sudo'ing everything...

1: Follow the steps and add the Debian Multimedia to your apt sources and install everything it says for your distro...in this case Squeeze. I'd get these as well just in case...some might not be needed but these helped me compile it better:
apt-get install libavcodec-dev liba52-0.7.4-dev libdc1394-22-dev libdirac-dev libfaac-dev libfaad-dev libschroedinger-dev liborc-0.4-dev libtheora-dev libx264-dev libxvidcore4-dev

2: Make sure you have sox already installed.
apt-get install sox libmp3lame0 libmp3lame-dev

3: cd /usr/src

4: get all dependencies.
apt-get build-dep sox

5: get the source file
apt-get source sox

6: (replace 'z' with your version #) extract source file.
dpkg-source -x sox_14.z.z.dsc

7: cd sox-14.z.z

8: Use vi or whatever editor you wish.
vi debian/rules

9: "DEB_CONFIGURE_EXTRA_FLAGS := --without-lame ..."
change the "without" to "with"
"DEB_CONFIGURE_EXTRA_FLAGS := --with-lame ..."
the "..." won't actually be there...I just didn't want to type out the whole line.

10: Build the package.
dpkg-buildpackage -b

11: go back up a folder cd .. then install all the shiny new files you just created.
dpkg -i *.deb

12: test er out...just showing "sox -h" won't really work since before I had mp3 support it already showed it in the list. so do a test (e.g sox -n out.mp3 synth 5 90) if it doesn't complain then [edit] voila [end edit]! you're good to go.

cheers.