apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Home

6 word stories

2014/08/22 by sudo

Once upon a time, Ernest Hemmingway was challenged to write a 6 word story. Take a minute to think about that – only 6 words, but 6 words that tell a story. This is a somewhat extreme example of flash fiction. Hemmingway came up with the following:

For sale: baby shoes, never worn

 

So, what can you come up with? This is a challange presented to Swindon Freewriters as part of their regular meetups. Here’s one of mine:

Missing alligator called bob. Reward offered.

 

Now, the problem is I’ve obviously written that having read Hemmingways example. I wonder what other things people would be able to come up with?

Red Alert, Captain to the bridge

 

Challange set! Check out the following resources:

http://www.sixwordstories.net/ allows community posts of six word stories

http://www.reddit.com/r/sixwordstories/ the ever popular reddit has a subredit for six word stories

http://en.wikipedia.org/wiki/For_sale:_baby_shoes,_never_worn for more information on the six word story by Hemmingway, Wikipedia is the place to go.

 

Filed Under: Writing Tagged With: 6 word stories, flash fiction

Mini Minion Crochet Pattern

2014/08/08 by sudo

Some time ago I started to learn Crochet, and this super small Minion was made back in November 2013.

miniminion

It’s an easy pattern, although a little fiddly as it’s so small. The original pattern can be found here for free:
http://philaeartes.wordpress.com/2013/07/28/mini-minion/

miniminion_2

There’s loads of variations around. Check out this happy little fellow:
http://amiguruthi.wordpress.com/2012/09/02/despicable-me-minion-free-pattern/

Filed Under: Crafts, Crochet Tagged With: crochet, Minion

Recover Data from Netgear NAS

2014/08/08 by sudo

I hold no love for NAS drives, often with very specific software and hardware setups. One just device – a Netgear Nas – died in the office. Instead of pulling the data from the backup, I thought it was worth trying to get the drives working in an old PC to recover the latest data.

This particular model of NAS uses EXT3 LVM as a file system. Great news if you’ve got a Linux live DVD lying around (almost). So Netgear Nas boxes tend to run on non-standard hardware, making the block sizes 16 instead of 4. This means it won’t mount without some extra hacking.

  • Start by becoming root on your live distro
    sudo su
  • Next, install fuse EXT2 in order to allow fuse to mount ext2 file systems
    apt-get install fuseext2
  • Install LVM2 if it’s not already installed. This will be needed to manage the lvm used by the NAS
    apt-get install lvm2
  • Check to see if the fuse module is loaded after intstallation
    modprobe fuse
  • The next series of commands will check the lvm drives and set them as active
    vgscan
    vgchange -ay c
  • If you’ve not done so already, create a directory to mount the drive to
    mkdir /mnt/nas
  • Hopefully by this point you got messages indicating the drive was ready. this uses /dev/c/c/ as the Netgear NAS drive in it’s LVM volume, and /mnt/nas as the mountpoint
    fuseext2 -o ro -o sync_read /dev/c/c /mnt/nas

Tra da! you should be able to navigate to the directory and pull the data off. Alternatively you could install linux onto a spare PC and mount this drive, setting it up as a samba share to replace the nasty NAS.

Filed Under: Linux, Technology Tagged With: data recovery, Linux, netgear nas

Installing Vagrant on Linux Mint

2014/07/19 by sudo

This article will cover installing Vagrant on Linux Mint, but what is Vagrant? Vagrant is a useful tool for setting up testing and development virtual machines on Linux. Setting it up on Debian and Ubuntu based distributions like Linux Mint is quite straight forward and the following guide will go over the main steps. For further information, Vagrant itself has some great docs http://docs.vagrantup.com/v2/. It covers installation of Vagrant on various Linux distros as well as more advanced management and configuration, but here’s a quick start:

Installing Vagrant on Linux Mint

First, open up a terminal and install virtual box, the kernel sources and vagrant all in one neat step:
sudo apt-get install virtualbox virtualbox-dkms vagrant

Please note that the version in Mint/Ubuntu’s repositories is not the latest one. If you’ve using tools such as PuPHPet you’ll need to grab the latest version of Vagrant from the Vagrant downloads page.

Make a new sub directory in your home folder for your Vagrant machines files to be stored in:
mkdir ~/vagrant

Now lets get create a VM. Pick what machine you want from the Vagrant Boxes (http://www.vagrantbox.es/). I’m going to use Debian 7.3. You need to copy the box URL.

Make sure you’re in your vagrant directory:

cd ~/vagrant

Initialise the vagrant box. This creates a configuration file for it which you can use to change key settings before you start it up

vagrant init debs http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box

Make configuration changes if you want to. I like to set a hostname and have the machine appear on my main network so I can access it from other computers

nano Vagrantfile

These are the additional lines I put in:

# Set the machines hostname
config .vm.hostname = "debs7"

# Setup a network bridge
config.vm.network :public_network

Now you can start the vagrant box. It’ll download the image first time so it might be a little slow to get going.
vagrant up

Once done, you can access it using
vagrant ssh

Filed Under: Linux, Technology Tagged With: development, Linux, testing, vagrant, Virtual machines

Setting up PHP XDebug in PHPStorm

2014/07/17 by sudo

Setting up XDebug in Apache

First off, ensure that the modules have been installed for php and xdebug:
sudo apt-get install php5-dev php5-cli php-pear
sudo pecl install xdebug

Now the packages should be installed, we need to find the default location for PHP and xdebug. Take note of both resulting directories:
which php5
sudo find / -name 'xdebug.so'

Horrah, we have our paths for the xdebug plugin so we can edit the approrpaite PHP files. There are two exciting options here:

Number 1 – you can edit PHP ini directly and add the code (later)

sudo nano /etc/php5/apache2/php.ini

Number 2 – you can edit the conf.d/20-xdebug.so file and edd the code (later)

nano /etc/php5/apache2/conf.d/20-xdebug.ini

Code for PHP.ini or 20-xdebug.so:

# This should be the directory you received from the find command you used earlier
zend_extension = /usr/lib/php5/20121212/xdebug.so
# These settings enable a connection to sublime text.
# If you're using PHP storm you can use the same settings,
# with other programs mileage may vary
zend_extension=xdebug.so
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=1

Now it’s a good idea to restart apache so xdebug is loaded:

sudo /etc/init.d/apache2 restart

 

Setting up XDebug in PHPStorm

At this point you will need to open PHP Storm to configure it with Xdebug. Once it’s open go to:

File -> Settings

Select PHP from the left hand menu

click … on interpreter

hit the “reload” button and xdebug should appear.

Click ok.

click debug on left hand column

make sure xdebug options are enabled.

Bookmarks

You need to create new book marks in your web browser. You can either follow the guide at it’s source, or keep following what’s in the article:
http://www.jetbrains.com/phpstorm/marklets/

Start xDebug


javascript:(/** @version 0.5.2 */function() {document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';})()

Stop xDebug


javascript:(/** @version 0.5.2 */function() {document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()

Debug this page


javascript:(/** @version 0.5.2 */function() {document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';document.location.reload();document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()

Filed Under: Development Tagged With: debudding, development, Linux, php, xdebug

  • « Previous Page
  • 1
  • …
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • Next Page »

Recent Posts

  • System Hang on Ubuntu 24.04 “e1000_print_hw_hang”
  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life

 

Loading Comments...