XCOM ENEMY UNKNOWN and Wine

how to setup XCOM under debian wheezy with playonlinux

Debian VPN server

making a debian VPN server and how to connect to it

FOSS Licences for sublime text 2

Free and Opensource licences for sublime text 2 autocomplete

Dual Boot Windows and Debian

Video on dualbooting Windows and Debian Linux

Free SSL certificate and debian

using a free ssl certificate and Debian

Friday, 8 March 2013

Hardware RNG

rng prototype
rng prototype (Photo credit: Dick Thomas)
these are the results from my failed RNG test build that killed my Arduino , I think it might work with some modification to the code


Enhanced by Zemanta

Friday, 1 March 2013

Android and Media Goblin

Some assumptions of this guide
  • you have eclipse and all the android stuff installed and working
  • you have a working media goblin instance
  • you know how to work eclipse and android sdk
1st thing is to enable the correct things in Media Goblin, edit your media ini file, mine is found /srv/mediagoblin/mediagoblin/mediagobin_local.ini
# place plugins here---each in their own subsection of [plugins]. see
# documentation for details.
[plugins]
[[mediagoblin.plugins.geolocation]]
[[mediagoblin.plugins.api]]
[[mediagoblin.plugins.oauth]]
then run
./bin/gmg dbupdate 


Then we need to build our android client but! before we do that we need some Oauth stuff visit http://media.example.com/oauth/client/register obviously changing details for your site, fill out the forms as a private with no redirect URL and either keep this page open or print it to PDF (Save paper) then we need the android client code so clone the git repo with

xpd259@mars:~/workspace$ git clone git://github.com/joar/mediagoblin-android.git
Cloning into 'mediagoblin-android'...
remote: Counting objects: 107, done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 107 (delta 36), reused 107 (delta 36)
Receiving objects: 100% (107/107), 317.13 KiB | 82 KiB/s, done.
Resolving deltas: 100% (36/36), done.
in eclipse edit the resource
mediagoblin/src/org/mediagoblin/android/client/NetworkUtilities.java

and change the secret key and client id already filled in with your own and then build on your client, Then on your phone it will now load up media goblin and ask for a url fill this in, and then login using your username and password now any media your from the gallery and maybe other apps (not tested this yet) will have a share to media goblin icon, after giving your media a title and such a quick upload will silently add it to the upload sync and
moments later it will be on your gallery

Enhanced by Zemanta

Monday, 18 February 2013

Hard drive of pain

Hard drive of pain by Dick Thomas
Hard drive of pain, a photo by Dick Thomas on Flickr.

Wednesday, 6 February 2013

multiple ssl certificates, apache2 and debian


there maybe other ways to do this but me and a friend spent 5+ hours at this problem and this was the only solution

1st you will need your files from StartSSL
I ended up with a www.key, www.crt, sub.class1.server.ca.pem and ca.pem files
while using the example at Apache + startssl does work, it requires a password typing during the startup of apache to de-encrypt the encrypted key files, while this is great for security, but when trying to use two key files with a password apache just asks for the one and ignores the others
so I removed the password from the key file and made it in to a plain pem file, and configure apache in one file


openssl rsa -in www.key -out www.pem

/etc/apache2/Ports.conf
NameVirtualHost *:80
Listen 80

Listen 443
NameVirtualHost *:443
SSLStrictSNIVHostCheck off
/etc/apache2/sites-available/default-ssl
<VirtualHost *:443>
        ServerName www.exapmple.com
        ServerAdmin email@example.com

   SSLEngine on
   SSLProtocol all -SSLv2
   SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM

   SSLCertificateFile /etc/apache2/ssl/www.crt
   SSLCertificateKeyFile /etc/apache2/ssl/www.pem
   SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
   SSLCACertificateFile /etc/apache2/ssl/ca.pem
...
rest of normal config
...
</VirtualHost>

<VirtualHost *:443>
ServerName gallery.example.com
ServerAdmin webmaster@example.com

   SSLEngine on
   SSLProtocol all -SSLv2
   SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM

   SSLCertificateFile /etc/apache2/ssl/gallery.crt
   SSLCertificateKeyFile /etc/apache2/ssl/gallery.pem
   SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
   SSLCACertificateFile /etc/apache2/ssl/ca.pem
...
rest of normal config
...
</VirtualHost>


Then a restart of apache2 and loading any modules it requires and "job is good one"


resources

Sunday, 3 February 2013

Easy ssh alias to simplify your life

If you’re anything like me, you're probably using of a half dozen remote servers on a daily basis. And if you’re even more like me, you have trouble remembering all of the various usernames, remote addresses and command line options for things like specifying a non-standard connection port or forwarding local ports to the remote machine.

A typical SSH command looks something like this

 ssh user@example.com
 Password: **************
Not too shabby, but if the port is not on 22 like default, A more complex example of a connection could be something like

ssh sdfds@example.com -p 8937

now we could make this easier by adding a alias to ~/.bashrc so we connect with a simple bash alias

$ alias web='ssh username@web.example.com -p 224050'
and simply running
# web
password: *********

however there is a more elegant solution, ~/.ssh/config

Host mirror
    HostName server1.co.uk
    Port 6223
    User mirror

Host www
    HostName server2.com
    Port 66
    User www-data

Host jupiter
    HostName server3.org
    Port 22
    User xpd259

Host fileserver
    HostName fileserver.foo.com
    IdentityFile ~/.ssh/fileserver_rsa
 
Host Minecraft
     HostName minecraft.foo.com
     User minecraft
     IdentityFile ~/.ssh/minecraft_rsa
     ServerAliveInterval 30                                                                                                                                           
     ServerAliveCountMax 120

then it's possible to connect via a simple

ssh www

or

ssh -X www

Saturday, 5 January 2013

Debian wheezy allow system wide use of wireless

I wanted to allow normal users to be allowed to access wireless networks without knowing the system password or been given access to sudo, while I've been told this has been updated and fixed in the sid package, some might not want to upgrade packages
so fire up your terminal and run

sudo nano /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy

then search for the follow section and below the translations edit the allow_active to say yes

  
<action id="org.freedesktop.NetworkManager.settings.modify.system">
...
...
  <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>

this should allow normal users to use network manager and use wifi without the admin passwords this "fix" might get undone if an update is applied to the system
this should also work for any system using policykit such as ubuntu and arch

Wednesday, 5 December 2012

force chrome bookmarks to open in a new tab

force chrome bookmarks to open in a new tab


To force chrome to open a URL in a new tab regardless of the mouse button the link is clicked with it is as simple as editing the URL with something like this

javascript:window.open('http://www.spritesandbites.net/');

sources

thanks to Spritebites on twitter

passwordless truecrypt in Linux

Passwordless Truecrypt

Using truecrypt to secure your data is a very wise idea, not only does it stop prying eyes from reading your data encase your PC is stolen it also means you can use a dropbox style syncing service, safe in the knowledge your data can (almost) never be read if the service is comprimised


Things you will need to do this

  • Root or Sudo access
  • knowledge of the command line
  • know how to use an editor

First Step creating the group to limit users to the truecrypt group who can use truecrypt

groupadd truecrypt

Edit the sudo config to allow the group to run the command

#Allow all members of group truecrypt to execute truecrypt command
%truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt

Add users to the group

gpasswd -a USER1 truecrypt
gpasswd -a USER2 truecrypt

logout and in again, and now when truecrypt is run, there should be no password dialog for mounting and unmounting other than your TC vaults password

Friday, 30 November 2012

creating <code> block in blogger

Creating a <code> block in blogger

I love my blog template, but it was lacking a code block to highlight when I was posting code other then using quote and that just didn't look right.

so how to go about it, html and css was the key. Make a background then make a green box around it then add some padding

.code{
background:gray;
padding:25px;
max-width:550px;
color:limegreen;
border-style:dashed;
border-width:2px;
border-color:limegreen;
}

this was all the css I needed to make the box look how I wanted it, but now to use it, I could use it inline but that would mean adding something like it everytime I made a post.
This was a messy idea and would mean dupication of code, putting it in the template and calling <p> class="code" </p> in the html editor was much more elegant.and less prone to errors
to edit the html/css visit Template in settings then customise-> Advanced -> css


by adding this code to the css section of advanced section of the template editor I can call it by adding the following to a post

<div> class="code" <p> text goes here</p> </div>
this creates the desired effect

Saturday, 24 November 2012

Embed an Audio file in a Blogger post

Embed an audio file in a post Blogger

Sometimes it is useful to post an audio file on your blog, other than making a soundcloud account what are your options ?

For hosting the files, you need somewhere to store the mp3/ogg so it can be played back

Whatever you choose, how do you then get a player for the audio?

Most browsers support HTML5 Audio element[1] so we can use the <audio> element
enter this code replacing URL.ogg/URL.mp3 with the URL to your mp3 or ogg file

<audio controls="controls" height="50px" width="150px">
  <source src="URL.ogg" type="audio/ogg">
  <source src="URL.mp3" type="audio/mpeg">
Your browser does not support the audio element. Upgrade your browser to one that does
</audio>




the player will play the 1st file format it recognises

also so the RSS feed has the media enclosed in it so podcasters play the audio you could do the following

Enclosure Links



Sources:

  1. http://www.w3schools.com/html/html5_audio.asp

Wednesday, 7 November 2012

Debian, Wine and X-Com EU


XCOM EU LOGO


installing XCOM-EU isn't as straight forward as it seems but it isn't difficult,


  • install PlayOnLinux and download steam client from http://cdn.steampowered.com/download/SteamInstall.msi
  • On POL (playOnLinux) use tools and install Wine 32 bit 1.5.16
  • "Install a non-listed program" on POL and select Use another version of wine & install some libraries
  •  install directx*, xact and physx via PlayOnLinux install some libraries menu
  • install steam, and quit installer once reaching login screen
  • add shortcut for Steam (xcom)
  • edit Steam short cut options in PlayOnLinux to include "-no-dwrite" (otherwise no fonts in Steam) 

add -no-dwrite
  • restart steam login, install XCOM-EU and enjoy


Saturday, 27 October 2012

Linux Debian Wheezy Blues

Thursday, 25 October 2012

gnome key bindings post

if you have come here looking for the gnome key binding post,
Sorry this post was lost when I moved my blog to Blogger

a copy can be found on way-back machine on archive.org and looks something like this
I don't know if this works with gnome 3


Setting gnome keybindings is dead easy
a key binding is a quick key combination to start a program

so pressing alt+crl+ F starts firefox

I've done this on ubuntu 8.4 but it should be the same for any distribution of Linux with gnome as it's desktop
how to set it up for firefox

press +F2 and type gconf-editor


this will open the conf-editor
navigate to
app>metacity>global_keybindings



and find a disabled run_command e.g run_command_1
edit it so it has f in it (see screen shot ^ )

then naviage to
app>metacity>keybinding_commands
and find the matching command e.g if you used run_command_1 then find command_1 edit it with a double click and enter firefox \and ok



now when you press the keys alt+ctrl+F Firefox will start
repeat process for any other applications you want to give a key kinding to

Saturday, 13 October 2012

shutter and Gnome 3

If like me you have noticed that shutter keyboard short cuts no longer work, The fix is surprisingly simple

requirements

  1. Gnome 3/shell installed
  2. Shutter installed
  3. little common sense ;)
First thing is to find the Keyboard settings in the control panel and click + on the Custom Shortcuts

Custom Short-cuts
Then lets "fix" the full screen capture, the command we need to run is shutter -f
so after clicking + and adding a name of your choosing add the command shutter -f for full screen mode

Full Screen capture

Then to capture the active window the command is shutter -a

so once again add a name and command

"Active window mode" capture


After this we need to set the shortcut key

click on Disabled and press the key/key-combo you wish for the command

I like "Print Screen" for full screen and "alt+Print Screen" for the active window

Monday, 8 October 2012

icepop in Inkscape

today, I decided to try inkscape (1st time ever) and this is what I made following the awesome screen-casts at http://screencasters.heathenx.org/

Icepop

I think I will try again later when I've used Inkscape for more than 30min




Sources