First figure out which theme you are using. List installed themes via:
% pelican-themes -l
simple
notmyidea
pelicanconf.py does not …
read moreFirst figure out which theme you are using. List installed themes via:
% pelican-themes -l
simple
notmyidea
pelicanconf.py does not …
read moreI think it improves website usability when they are navigatable via the URL.
For example when viewing Posts under the …
read moreAn update to the Japanese Garden, aorund 10 years after it was built.
read more^ Matches the beginning of a line
$ Matches the end of the line
. Matches any character …
Notes From Reading Adaptive Signal Theory (5th Ed) by Simon Haykin
Node Red vs Home Assistant
Which is better* ?
*better: CPU/RAM efficient, easier to learn and or offer better support …
read moreWith Proxmox installed time to setup Plex in a container, and migrate from Synology NAS.
I am following these guides …
read moreTo improve the Plex transcoding options and off load the computation from the NAS, the plan is purchase a BeeLink …
read moreCat 8 Wiring, comes in 2 variants T-568A and T-568B.
Cat8 replaces the need for crimping tools with field termination …
read moreWhen a Synology NAS creates a VPN connection it overides the default gateway, except for devices listed as contained within …
read moreWhen TeX/LaTeX is fully justifying text there are times when it could do better but it does not know …
read moreparbox
is a LaTeX command used to place a box around text.
Remeber that optional arguments are in [] (Square brackets …
read moreLaTeX macros can be used as simple text replacments for example:
\documentclass{article}
\newcommand{\LUG}{LEGO User Group}
\begin{document …
WYSIWYG editor for LaTeX lyx, and a manager for Bibliography JabRef.
Lyx Tutorial: Lyx mac Guide
JabRef Tutorial: Getting Started …
read moreChain Cleaning method:
Clean the chain with WD40 (water dispersant).
Wipe dry with kitchen roll.
Spray with Comma White Grease …
Creating/Setup a pyhton virtual enviroment called 'venv'
python3 -m venv venv
Load the virtual env called venv
source venv …
Convolution in Python, for merging filter responses, creating pascals triangle ...
import numpy as np
a= np.array([1,1])
b …
Perforce can temporarily checkins of changes that you might want to share with others before fully commiting them to the …
read moreUsing python script to merge pdfs together.
Install package
pip install pypdf
Script:
from pypdf import PdfWriter
pdfs = ['file1.pdf …
On the journey towards publish static site generator blog posts from iPadOS, my next step after installing stash on pythonista …
read moreInstalling stash on pythonista
read morePython example for reading data from a csv file.
import csv
with open(data.csv', newline='') as csvfile:
spamreader = csv …
Create and plot a sinewave in python
read moreApples default directory structure is :
/Users/username
├── Desktop
├── Documents
├── Downloads
├── Library # Hidden by default
├── Movies
├── Music
├── Pictures
├── Public
My current …
read moreHomemade potting bench, using 15 2.4M Fence boards (£45).
Note for ease of building the height was 1.2M …
read more3 Fence boards used to create planter.
read moreAs previously decribed floating point arithmetic is not associative. Which means it is very easy for floating point models not …
read moreIt is quite common to detect how many input arguments have been passed to a function, using nargin
(N arguments …
reg
and wire
were the original synthesisable types. Wires are constantly assigned and regs are evaluated at particular points, the …
To set a default define option while allowing it to be overridden from the command line.
`ifndef mode_sel
`define mode_sel …
The best practice is to use a tcl file:
shm.tcl
database -open waves -shm
probe -create your_top_level -depth all …
Time can be displayed during simulation using %t
.
$display("%t", $realtime);
Timeformat is used to control the way (%t
) this …
After accidentally scrolling back a page when browsing the web in chrome too many times. Figured out how to disable …
read moreA minimal example of constrained random to constraining a 4 bit value to 0 to 11 when randomised.
module tb …
Efficiently create a thermometer code in verilog:
localparam M = 32;
function [M-1:0] therm_code;
input [$clog2(M):0] val;
begin …
When .
just will not do (repeats last action) because you need to capture a movement as well, macros are quick …
For use with the Panasonic Bread Maker SD-2501 & SD-2500.
Online Manual.
Gluten Recipes can not use timer function.
For best …
read more1 2 3 4 5 6 7 8 |
|
F-stop Loka with side mounted Manfrotto 055XPROB (3 stage carbon), with a Manfrotto 488 rc2 head.
{% img centre /images/Photography …
read moreTo prepend to to filenames
cd to_folder
ls | xargs -I {} mv {} addthis-{}
or target jpgs
cd to_folder
ls *.jpg | xargs …
Just realised there is a difference between word and WORD in Vim.
WORD is non-blank delimited by whitespace. word is …
read moreI just discovered the xkill
command, when a window has crashed you
can call xkill and get a skull and …
Setting an alias in you .tcshrc
alias qrun 'qrsh -V -noshell -cwd !*'
or bash
alias qrun='qrsh -V -noshell -cwd …
On Mac OS X matlab behaves quite oddly with the track pad zooming in and out very quickly and erratically …
read moreMatlab always use to open text files in tabs in the same editor window. When switching to 2014a documents started …
read moreTo set each constant in a model to sample time -1:
blks = find_system(dut, 'BlockType', 'Constant');
for i = 1:length …
Select a block ie gain in Simulink then in Matlab type:
get(gcbh)
This shows the list of properties which …
read morefind_system('BlockType', 'Gain')
This will list all gain blocks in currently loaded models. to limit to a particulat model:
find_system …
error: storage class specified for parameter
There is probably a missing semicolon ;
in a header file! Just written my first …
To redirect stdout and stderr in bash we use:
./ShellFile.sh &> test.log
However in tcsh that results in:
Invalid …
Inconsistent, annoying, cheap?
My main bugbear with the creative cloud application is the way it updates applications. Photoshop CC and …
read moreAs I use the code blocks for ingredient lists on my recipe pages I wanted to have a different style …
read moreTo wait for a maximum of 10ns
for positive edge on clk then carry on with simulation.
fork : wait_or_timeout
begin …
To add X and Y grids to plots :
grid on;
To add Y only grid:
set(gca,'XGrid','off','YGrid …
Wrap strings with sprintf
to allow the \n
to be escaped correctly.
>> disp('hello\nworld')
hello\nworld
>> disp(sprintf('hello …
My large ICU loaded with my Strobies portrait kit and Canon 580EX MKII.
The collapsed soft box is folded into …
read moreKettlebell rack with 24kg, 16kg, 8kg, 12kg, 16kg, 20kg.
End detail showing bracing.
Underside of rack.
read moreWhen a script or function is called with run(./relative/path/script)
the working directory is changed to the ./relative …
Checking if an Array contains a number:
input = [1,2,3,4];
check = 4;
any(input==4)
Check if a …
read moreUsing Matlab to splitting data into odd and even samples.
A for loop approach:
data_odd = [];
data_even = [];
for i = 1:length …
Available to buy from WEX. Also see Lee Wide Angle Hood.
Hoods or lens shades help improve contrast by stopping …
read moreLast year I got a pair of the pro stretch trousers for walking, they were pretty good for walking in …
read moreRuby methods can set default values for optional arguments:
def commit(path=Dir.pwd)
To take an optional number of …
read moreWith a command line Ruby application using Thor for the option parsing I want to be able to run:
$ thor_app …
Lightroom plugins for metadata views are called metadata tag sets and only require 2 text files.
create a folder called …
read moreBased on a Stackoverflow answer, to import environment variables into Verilog you can use:
import "DPI-C" function string getenv(input …
When creating my blog I have been inconsistent with the tag command line
, Command line
and
Command Line
the case …
Enter copy mode
ctrl-a [
Use cursors of vim motions to move to relevant area.
Space to start selection, space again …
read moreFor adding leading zeros to a number the following can be used for 4 decimal places with integer input:
dat …
Since upgrading to Mavericks I get a sound whenever I get mail. I find this very annoying so first port …
read moreTo wrap a function with variable input arguments and pass them all on to the wrapped function. Based on a …
read moreIn ruby we can perform schwartzian transforms easily with the sort_by method. This allows sorting enumerators by any property.
For …
read moreUpdate to the raised beds. Delivery of top soil:
Raised bed lined with weed barrier and then 20mm Gravel. Filled …
read moreJust after Christmas I got a Joseph Bently digging spade (larger than the border spade). Bought from Dunbar Garden Center …
read moreSunday trip to Marryhatton. Getting serious about propagation now, got these seed trays to move the seedlings to after they …
read moreNot a review, just noting the default position of the velcro hydration loop, before I remove it. Left shoulder, under …
read moregit tag -a 0.0.1 -m "Tag comment"
git push --tags
Note: The use of major.minor.patch Semantic …
read moreIf we truncate a number, that is to throw away the LSBs (least significant bits) we loose resolution.
A 4 …
read moreThat is Ginger not stem ginger pictured, it works, but stem ginger is much better.
Dark choclate Shavings (for …
Handling functions with extraneous leading outputs. For example:
function [a,b] = dummy_function
a = 10;
b = 20;
endfunction
[a, b] = dummy_function …
To shuffle a:
a(randperm(length(a)))
Example:
a = [10 2 5 20];
a = a(randperm(length(a)))
a =
5 …
Removal of substring:
string="test string"
echo $string
remove="test"
short_string=${string#$remove}
echo short_string
Note that inside the ${}
string …
Based on a uktv recipe.
150 g Puy lentils
400 ml Water
3 Onions
1 tbsp Sugar …
In your sources
branch, which is the main branch for writing creating posts, create a CNAME
file in the sources …
I use gitx
graphical tool on OS X to find the SHAs for commits. Revert back …
I do not think that there are any magic bullets, best practises can minimise risk but you have to fully …
read moreCreating new posts in Octopress is rake new_post["Edit Posts"]
which outputs the created filename.
Posts are prefixed with date …
read moreIn Verilog to output to stdout without a line return use $write();
Equivalent statements :
$write("\n");
$display("");
Mathworks Article on Object-Oriented programming for Matlab.
A quick example of the syntax:
classdef sads
properties
Name
SampleRate
end
properties …
The first batch of seeds in the propagator are off to a good start.
Rocket:
De Cayenne, Chilli Peppers:
Soon …
read moreFirst signs of spring, bulbs starting to show growth.
read moreSometime ago I enabled focus tracking the mouse on Gnome. It took a while to find how to disable it …
read moreOn Saturday I placed Rocket seeds in my propagator and by Tuesday it had germinated and started to sprout.
So …
read moreI have always had trouble getting seeds to germinate, therefore I have purchased a propagator to help. Ideally I would …
read moreBased on post_filters by imathis.
First Move the original method out the way with alias_method
then create a new method …
Putting together my first raised bed, 8 foot by 2 foot, 1 plank high.
Cut parts ready for assembly:
The …
read moreBased on :
Jamie Olivers Minced Beef Wellington from Jamie's Ministry of Food.
Ingredients (for 4-6) :
1 Large Potato
1 Medium …
When plotting several lines in Matlab, I have become aware of how hard it was to see the colours in …
read moreLe Creuset do not list pan volumes on there site so for Round Cast Iron:
Diameter | Volume |
---|---|
18cm | 1.8 … |
In the following example we test the allocation speed of different types:
samples_to_avg = 10000;
for i=1:samples_to_avg
tic; t …
Received the following errors when doing brew update
on mountain lion:
error: The following untracked working tree files would be …
Dunbar Garden Centre Over Jan & Feb 2014 ran a 2 for £12 offer on Chapelwood bird boxes. Due to some …
read more2013 I got my first garden and I had no idea where to begin. So I picked up a few …
read moreIn 2007 I built our coffee table from 2.5" thick Elm purchased from Lanarkshire Hardwoods.
The wood was rough …
read moreA new feature in the dining room.
Approximate materials and cost:
Section of plywood ~£10
16 meters of 2.5mm …
F-Stop camera bags have an adaptable system for trading camera space for other outdoor gear. The swappable section are called …
read more$ git submodule update
fatal: Needed a single revision
Unable to find current revision in submodule path 'vim/bundle/systemverilog'
To …
read moreFitting is relatively straight forward. Use a credit card to place clips in the frame 85mm from the top and …
read moreA flip-flop (D-Type) is essentially 2 latches in series with the enable to one inverted. This stops the flip-flop from …
read moreI use to use svn revert
to roll back local modification and get back to the state I was in …
rtorrent moving torrents upon completion:
# Torrents go in ~/Torrents
# Incomplete Downloads in ~/Incomplete
# Upon Completion Data is moved to ~/Seeding …
This is not a foolproof method, as vim colorschemes are just vim commands but by default they set:
let g …
Here are some aliased commands which stop line wrapping on really long lines, making the output much more readable:
# Stop …
Deciding to see if I could make my vim status line a bit more practical for myself. I decided to …
read moreTray Bake Chicken Dinner.
{% img centre /images/TrayBakeChickenDinner/morganp-20130703-TrayBakeChickenDinner-IMG_2247.jpg %}
Based on recipe from "Jamie Oliver's Recipe" iOS app.
Ingredients …
read moreCowboy Style Chilli
Based on recipe from "Jamie Oliver's Recipe" iOS app.
Ingredients (for 6)
1KG Diced stewing beef …
{% img centre /images/SweetSourPork/morganp-20130925-SweetSour-IMG_4134.jpg %}
Based on recipe from "Jamie's Ministry of Food"
Ingredients (for 2)
200g Basmati …
{% img centre /images/ChickenTikkaMasala/morganp-20130910-ChickenTikkaMasala-IMG_3991.jpg %}
Based on recipe from "Jamie's Ministry of Food"
Ingredients (for 4)
4 Chicken breasts …
The metadata panel in Lightroom has always felt a little crowded to me. It shows too many dialog boxes or …
read more11 Months since the last Release Hugin 2013.0.0 is released.
One of the best photo stitchers available at …
read morerepmat(matrix, [repeat_y, repeat_x])
Horizontal
repmat([1 2 3],[1,4])
ans =
1 2 3 1 2 3 1 2 …
Running the Simulink model model.mdl from matlab for a specified time:
sim('model', stoptime)
Where stoptime is a number …
read moreGood programming practice is to use spaces to indent code rather than tabs. Due to tabs often being rendered differently …
read moresetenv allows sub shells to inherit the value.
set x = "twenty"
echo $x
> twenty
## New Shell
csh
echo $x …
The programs available on your Gardener C14e water computer (timer) are:
Program | Cycle | Duration |
---|---|---|
00 | None | 0 |
01 | Every 6 … |
A typical work flow in Matlab involves a folder filled with scripts and functions. Over time this folder grows until …
read moreWhile not attempted getting good images of the milkyway yet every so often I see some good examples and do …
read morecat /etc/redhat-release
Returns some thing like:
Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Find Kernel version using …
read moreIn the UK you can now get regional weather alerts from the Met Office.
Unfortunately it does not break it …
read moreTo check if an environment variable exists in .mycshrc or shell scripts
if ($?TERM) then
echo "TERM is $TERM"
endif …
As the growhouse stops the plants recieving rain I decided to try micro-irrigtion. It comes with a gardnen computer to …
read moreA cheap (~£15) four tier Botanico growhouse, with my current selection of potted herbs.
Over the course of the summer …
read moreIn ruby Dir.entries takes a path and returns a list of its contents. However it does not deal with …
read moreAfter using Lightroom for over 6 years I still do not see the point in Lightroom Collections.
Scott Kelby Describes …
read moreI have decided to clean up my vim colorschemes. I have been using ir_black for sometime but it does not …
read moreMeatballs (£? a portion) time to table ~?.
{% img left /images/Meatballs/.jpg %}
Ingredients (for 4)
400 g lean pork mince
400 …
On the continuous search for a decent ADSL, Router and Wireless access point. I have tried many (unscientifically). Finding that …
read moreStackoverflow have supported markdown for a while. The syntax for showing an image is :
![Holes in Leaf 1][1]
[1 …
The first tree I purchased was this Yoshino Cherry: Prunus x yedoensis Ivensii for £40 from Smeaton Nursery.
For the …
read moreI was wanting to use Dir.glob to get a file list and wanted to do Dir.glob( path + '*')
but …
gf
In your vimrc
" gf goto_file, automatically add search for these file extensions
:set suffixesadd+=.v
:set suffixesadd+=.sv …
Stew (£? a portion) time to table 3 Hours.
{% img left /images/BeefGuinnessStew/morganp-20130518-BeefGuinnessStew-IMG_0932-Ready.jpg %}
Ingredients (for 4)
2 * 375 g …
Cake (£? a portion) time to table ~?.
{% img left /images/CoffeeCake/morganp-20130518-CoffeeCake-IMG_0822-Cake.jpg %}
Ingredients (for 8)
3x25 ml double espresso …
To add static about page to octopress blog, assuming that octopress has been already setup:
Create the page from the …
read moreAfter struggling to get the rake task for octopress to deploy I decided to fall back to the command line …
read moreCake (£1.23 a portion) time to table ~1 hour 30 minutes.
{% img left /images/BlackForestGateau/morganp-20130505-BlackForestGateau-IMG_0770-Cake2.jpg %}
Ingredients (for …
read moreLamb curry (£1.95 a serving) time to table ~1 hour.
{% img left /images/LambKeema/morganp-20130505-LambKeema-IMG_0759-Final.jpg %}
Ingredients (for 4 …
read moreStill unresolved
The Jetway ADPE4S uses a Marvell 88SE6145 chip which a number of users have had trouble getting to …
read moresudo lshw -class disk -class storage -short
Outputs :
H/W path Device Class Description
=====================================================
/0/100/1c.3/0 …
BT broadband has BT Web Address Help enabled by default. This allows then to redirect you to another site if …
read moreNormally this would just end up on my link blog, but thought it was worthy of a proper mention.
read moreBitTorrent Sync although still in Beta offers a App and protocol for DropBox like file syncing. As it is an …
read moreThe Lightroom 5 Beta is out now, Free and active until June 2013.
From adobe :
New Features in Lightroom 5 …
read moreISO 8601, to me looks a lot like reversed British format which has been my standard for including in file …
read moreNik Software (HDR Efex Pro, Silver Efex Pro) was recently purchased by Google, since then not too much has happened …
read moreTesting a matlab array for equality can be doen a few different was some have surprising side effects if your …
read moreConfigurable order of numbers:
x+y = y+x
xy = yx
Order that multiplication is applied :
(x+y)+z …
To enable code folding in Vim type (from normal mode):
:set foldmethod=marker
Or add this to your .vimrc
set …
Initially Launched at $99 in the US or £99 in the UK. Today they seem to be charging $99 regardless …
read moreAfter a bit of research I decided to give PhotoSmith Version 2.2 a go, it is the most expensive …
read moreHow to get method which handles a single string input or an array of strings?
* turns single strings into …
read moreAfter running a brew upgrade
rtorrent was plagued with segmentation faults. Which look something like :
Caught Segmentation fault, dumping stack …
A new Release Candidate for Lightroom is out, Lightroom 4.3 RC1. Expires 31st Jan 2013.
For me the main …
read moreThe new Canon Cash back offer IS now valid for purchases between Thursday 18th October 2012 and Thursday 24th January …
read moreTo capture the screen on OS X :
⇧⌘4 : Selected area to capture.
⇧⌘4-space : Capture a window.
These are defined in …
read moreAvailable to buy from Dale Photographic or WEX.
Hoods or lens shades help improve contrast by stopping out of frame …
read moreTake an array of arrays and format it for displaying to the terminal or outputting to a text file …
read moreGiven a flat hierarchy of data comprising level and a label, aim to nest the lower level of objects in …
read moreAfter getting Safari 6 it seems that YouTube is no longer letting my watch video as html5 video formats and …
read moreFor this example we will have a data file with two columns of data labelled A and B. For example …
read moreFor code reuse within I have found Subversion externals really nice to work with. Instead of copy and pasting code …
read moreThis is based on a guide to adding retina support to websites.
To add a tiled (repeating) background cretae 2 …
read moreIf entering Mission Control (ctrl-up) is taking to long you can speed up the animation entering the following in the …
read moreA the time of writing Google exchange syncing only works on mobile devices, which is slightly annoying but mail, contacts …
read moreTHIS NO LONGER WORKS, IF IT EVER DID :(
When you add a link to safari, it replaces the link to …
read moreIn gvim and mvim incorrect spellings are highlighted with a squiggly underscore ala MS Word. vim in a terminal (xterm …
read moreFor ssh and ping to local machines with out the .local extension I added them to my /ets/hosts file …
read moreIf you use the ⌘I shortcut in finder with a file selected you get a 'Get Info' window. If you …
read morectrl-6
For the example we will create 3 new temp files and then open them in vim.
touch vim_test1 …
From OS X Lion the Users Library folder has been hidden. To find it make Finder the active application, that …
read moreThe settings for Twitter and Flickr feel a little hidden at first. To set them up go to System Preferences …
There is currently a preview (Beta) of [Little Snitch 3][littelsnitch3]. If you have not come across Little …
read moreFollowing on from Macbook Pro Setup, Now it is time to install some of the command line tools.
I have …
read moreSome info on what has changed in Xcode 4.3. Latest is 4.4 but a lot changed in 4 …
read moreMacBook Pro with Lion arrives, before installing any other software apply for the Up-to-Date Programme for free a mountain lion …
read more/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
To Reset it back to this value run (from /Applications/Utilities …
read more/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
To Reset it back to this value run …
read moreI have specifically been trying to find out how to transfer my full GB Memory Map OS 1:50K 2012 …
read moreOne of the limitations of mountain lion is that they are only going to support 64 bit Kernel extensions, the …
read moreAfter deciding to try out epub on the kindle, as I noticed people are listing epub as an apple format …
read moreLightroom 4.1 is now available. Not much looks like it has changed between this and the RC1 release version …
read moreThe subscribe button on the iPad youtube app is quite well hidden.
View a video from the channel you are …
read moreGot the steam punk Gelaskins case yesterday, they can be a fiddle to fit but incredibly thin and adds grippines …
read moreIn iOS 5 If you have iTunes Match enabled ie to download your songs from the iCloud while on the …
read moreAround up of nice looking ipad docks / cradles
From Just Mobile
UpStand | Encore Desktop | Slide |
---|---|---|
[ ][ encore] | [ ][ slide ] | |
£32.50 | £48 … |
While using a pool laptop from work and trying to connect to my home wifi I am prompted for my …
read moreTo reduce an array of Booleans to a single Boolean using enumerables reduce method:
[true, true, true].reduce( :| ) ## OR
=> true …
In ruby you can catch StandardErrors using begin rescue end
begin
#Some thing which might fails
rescue
$stderr.puts $!
end …
There was an interesting post on hacker news recently, safeshepherd suddenly fell off the google for their own name. The …
read moreA recent article by sef about how to judge an engineering companies respect engineers and the strength of the engineering …
read moreThree now have tethering available for the iPad 3, which can be read in the comments by moderators on the …
read moreWhen working behind a restrictive firewall, which limits ssh connections you may be running into some of the following errors …
read moreI started off following the ubuntu guide for installing a new drive, which uses fdsik to create the partitions how …
read moreThe camera aperture is how far the iris is kept open during the exposure. A wide aperture, large opening lets …
read moreAfter making a few updates to my site it stopped working after deploying. The issue was that the gem version …
read moreThere are gzip compression options available but when I looked at this a long time ago I found that the …
read moreJoe Cornish has been a great influence on my photography, he traditionally works with a large format field camera and …
read moreWhile the Light and Land books do not have to be read in order I think it helps as they …
read moreHigh quality printers actually have lower resolutions than you would expect. Nothlight Images have a good article on it here …
read moreWhen working with digital images some effort should be put into understanding the colour space. Which basically means that for …
read moreWhile enjoy photography I am not that interested in portrait, fashion or lifestyle photography but for some reason I decided …
read moreI have been setting up my recent Sinatra projects with a standard ruby project layout putting all of the application …
read moreUpdate RVM
$ rvm get head
List current versions, and all versions
$ rvm list
$ rvm list known
Select the version you …
read moreSometime a script needs to now the directory that it is executing from, the best solution for this is:
DIR …
Are you running into the following error
Encoding::UndefinedConversionError - "\xE2" from ASCII-8BIT to UTF-8:
If you are using Ruby and …
read moreEntering the following command in to your .bashrc seems like a simple way forward.
xmodmap -e "remove lock = Caps_Lock"
However …
read moreWhile working on this site I wanted to find a simple way of trying out multiple stylesheets for different colour …
read moreWorking on my site design I thought it would be nice to have user selectable stylesheets, say a black text …
read moreIf you are working on a new system or with multiple environments it is good to know what type of …
read moreAnswer:
svn commit -m $'Line 1 \nLine 2'
Committing to subversion on the command line and using escaped …
read moreCron jobs can have there results returned as mail via the unix mail system. If left unchecked for a while …
read moreA simple script for finding temp files from the current directory and below. I often run this before adding a …
read moreI have just added the method below to my ruby .irbrc file for quickly calculating image megapixels. from OS X …
read morectrl-r "
Actually ctrl-r reg
, where " is the unnamed register from the last yank or delete.
If you have done …
read moreOriginally written as an assignment for Ruby Mendicant University.
matrix is part of the Ruby Standard Library
A note …
read moreI noticed today that greps recursive function is different to finds recursion.
find ./ -name *.txt
grep -R 'text' *.text
The …
read moreLightroom 3.6 has been released. Downloads for Mac and Windows.
Hugin 2011.04 has also been released.
read moreThere does not appear to be a nice way to get a current users real name in ruby. The best …
read moreSuppressing warnings is usually a bad idea but if you understand the risk and want to carry on regardless. When …
read moreThere is a very good presentation Confident Code by Avdi Grimm author of http://exceptionalruby.com/. Previously presented at Cascadia …
read moreBack in 2009 barkingiguana wrote about how explicit returns 'return "String"'
was slower than an implicit return, ie just letting …
This assumes that origin
is the label for github.
Tagging a github repo for my gem releases I do:
$ git …
Previous posts arrays and arrays2
Based on a post by barkingiguana, some idiomatic ruby ways to handle arrays. Ruby tries …
read moreA small standalone script that search through a file doing text substitutions.
1 2 3 4 5 6 7 8 … |
Just making a note to self to check these regularly for updates
Joe Cornish 1-2 Day Workshop
Light and Land …
Do you some times see:
FileUtils.rb:93: warning: already initialized constant OPT_TABLE
FileUtils.rb:1176: warning: already initialized constant …
Building on my original Ruby Arrays article a few more things you can do with Ruby Arrays.
Concatenation
a = [1 …
While working on some disk space / folder structure scripts I had several functions which hierarchically search the disk then performed …
read moreInstall Avahi, it like bonjour auto discovery but for linux, then tell it about your servers samba service.
$ sudo apt-get …
The new (July 2011) Mac Book Air is now out, shipping with Lion.
The combination of these two fixes some …
read moreUsing ssh to securely connect with servers from the terminal is pretty easy. set up a public key and a …
read moreUsing ssh to securely connect with servers from the terminal is pretty easy. set up a public key and a …
read moreWhen working with HDLs (Hardware Description Languages) there a few things that could be improved/made easier:
Renaming a file …
read moreRead text file with one line:
Write text with one line :
When reading a text file …
read moreWorking on a joint project an error started showing up when trying to perform migrations.
$ rake db:migrate VERSION=0 …
To make an automatic ActiveRecord database connection using ENV['DATABASE_URL'] The following snippet can be used:
From ActiveRecord 3.2 …
read moreTo connect to a rails style DB config outside of the normal workflow, or using a database.yml in a …
read moreAn old guide is written on the Apple Developer Forum however if you are using Homebrew it is much simpler …
read moreThis vim plugin will allow you to gist directly from vim, simple way is just :Gist to gist entire file …
read morerecenlty after updating rubygems Istarted getting a lot of warning like this when running ruby or executable gems:
NOTE: Gem …
read moreWhen running gem build on a new library I have been working on I started getting the following error:
[ruby_svg_light …
I have captured all 5 lists here, but they are only a ⌘/ away.
I have not fully read it but it looks like this is a good guide to bash scripting. A few …
read moreIn Vim to insert text before the cursor press 'i', to insert text after cursor 'a' or to edit at …
read moreClasses are a basic Object Orientated Structure which encapsulate state and behaviour. Some times you just require to capture state …
read moreBased on 'Raise the bar, lower the pressure' given by Durran Jordan at ScotRubyConf 2011.
There has been some debate …
read moreI recently heard about the Schwartzian transform, which is a sorting idiom from perl. It allows an array of objects …
read moreIf a torrent application has been running and torrents start showing a status of 'unregistered torrent' a likely cause is …
read moreUsing a while true loop with 'gets' and a case statement, can create a compact command line interface for ruby …
read moreI have just finished some minor updates to the site. The largest is the move to Droid Fonts, Google Fonts …
read moreBased on an old Article I wrote, investigating incase sensitive sorting performance.
I have an active record model call Tag …
read moreNone of this has been tried yet but from various sources I have created this list:
Once you have telescope …
read moreUsing Tags (An active record model) to find tags by the tag property:
Tag.find_by_tag("Ruby")
Ruby
Tag.find_by_tag(["Ruby …
After making a few updates to my site I decided to upgrade the version of sinatra I was using in …
read moreThe routes for my site have been growing since adding pagination (/articles/older/) and tag filtering. As well as the …
read moreConsidering various raid strategies I decided that Raid 5 would be too limiting and have previously found raid striping systems …
read moreI have been running into issues with screen when switching to another user:
$ su otheruser
> password
$ screen -x
> Cannot open …
A new very cool plugin for Rubyists using Vim. RubyBlock TextObjects created by Drew Neil from Vimcasts.org. Once installed …
read moreI think it is good practise to create a read only tag when releasing an application. This allows you to …
read moreCurrently OS X 10.6.3 - 10.6.5 the ncursers library is broken. A hacky fix is to copy …
read moreFor various reasons Mac OS X (at least 10.6) can get the system cache out of sync with the …
read moreSince moving to Classy Sinatra applications I have not been able to get put and delete methods to work correctly …
read moreI am currently switching between runing migrations locally on an sqlite3 database and postgres for production on Heroku.
When switching …
read moreRack applications often require a config.ru for deployment. The standard config.ru for classic sinatra applications is well documented …
read moreI have just started to use a sinatra extensions called Sinatra Session. The write up on the main site is …
read moreSinatra Reloader is a sinatra extension which reloads source files while in development mode, this functionality was removed from base …
read moreTo Stop Start and Restart Samba on Mac OS X 10.6:
sudo /usr/sbin/smbd stop
sudo /usr/sbin …
NB: By default the image is only 500pixels on the long edge. By donating to the project you can remove …
read moreIn ruby some times you want to iterate over an array and remove items that meet certain conditions, if using …
read moreI have for a while wondered about an ideal (good) approach to storing api keys in config files in ruby …
read moreThe new EC2-Pricing also includes a new Micro service. This micro service is intended for small apps servicing tens of …
read moreI recently discovered a feature of regular expressions called lookahead. This means for a match the lookahead must exist but …
read moreOne method to save a time and restore it correctly:
def get_time_run
## File Access based on
## http://rubylearning.com/satishtalim …
The Preferences menu in OS x give you the option to turn off Hard Disks whenever possible to save power …
read moreAs this seemed to be a useful post on my old blog I am reposting it. Just in case the …
read moreWhen running a sequel migration I kept getting this error:
Error: NoMethodError: undefined method `compact' for nil:NilClass
My setup …
read moreGrep is a unix (and mac os x) command line tool to search files for text.
1) Search for all …
In Active Record when updating records I used to have an very manual process to this some thing like:
@todo …
When working with databases it is often a requirement to have unique elements (columns) which are not the primary key …
read moreAn example of joining tables through active record models. There is a good tutorial on the basics of Activerecord joins …
read moreFlickr is a great way to backup your photos and other images for around £25 a year you get unlimited …
read moreI have been wondering how to do this for a while and accidentally discovered it while perusing this heroku page …
read moreCSS or Cascading Style Sheets are used for styling html elements. HTML elements can have id's, which must be unique …
read moreFollowing this article lets you turn a executable java .jar into a mac appliction (.app). The Tools are only available …
read moreAfter adding some USB2 (NTFS formatted) drives to a headless Ubuntu server, they were not auto-mounted so I had to …
read moreI have been trying to use the GeoIP Rack App, by copying this gist in my Rack stack with a …
read morePragmatic TV release there screen casts in iPod, Quicktime and Theora Ogg formats. Since Theora Ogg seems to be the …
read moreAs previously mentioned SystemVerilog introduced abolute delays in the form of #1s;
, #1ms
, #1us
, #1ns
.
Using these as values passed …
I used this as a jQuery reference to hide and show default text in forms.
<head>
<script type=”text/javascript …
After updating my website on webfaction nginx kept saying permission denied and when I tried to view my site I …
read moreThis snippet can be added to you ~/.vimrc to highlight long lines.
" Highlight lines over 80 characters long with red …
To search in Vim just press (apple-f for macvim) / then search string.
/search
This will highlight all occurrences of 'search' …
read moreHomebrew is a new package management system for Mac OS X. A good review/tutorial on EngineYard.
Update 20-August-2010
Then …
This is not necessarily the correct way of creating executable gems but a method which worked for me.
Assuming we …
read moreJust released my first gem 'memory_usage' Version 0.0.1.
$ gem install memory_usage
Assuming the gems folder has been set-up …
read moreIf you are trying to use the 64 bit version of handbrake on Snow Leopard do not for get that …
read moreMacBook3,1 (2007) Intel Core 2 Duo 2.2GHz Hard drive and memory upgraded to 320GB and 4GB
Graphics GMA …
read moreI might have just made up includable, but I like it.
Some times you have written a ruby script (using …
read moreThe *.m4b extension is used for audiobooks on the iTunes Store and is a convenient (if you have an iPod …
read moreI have written a few command line tools in ruby which I use to perform file system maintenance. Mainly sorting …
read moreThere currently does not appear to be any really good torrent file parsers available via the gems system.
rubytorrent seems …
read moreOpen office by default does not have a mode to auto start the presentation when launched. With the ImpressRunner plugin …
read moreI do not like having to use sudo to run development servers for testing web applications. sudo should be reserved …
read moreUsing the new IR ANYWHERE IR OVER IP MODULE you can send web requests that get turned into standard consumer …
read moreDirectory listing can be enabled (disabled by default) by adding this:
autoindex on;
Example usage
http{
server {
#Server with no …
By default git status returned differences in file permissions. To turn if off run:
$ git config core.filemode false
I recently documented how I installed Ruby Enterprise and nginx on Mac OS X. Here we see how to make …
read moreThe '413 Request Entity Too Large' Error message is because you have filled in a form and are submitting it …
read moreDownload ruby enterprise and follow instructions on page. The exact commands I used are:
$ cd ~/bin
$ wget http://rubyforge.org …
Matlab figure properties which can be set through the properties editor can also be set by scripts. My main stumbling …
read moreA simple Sinatra web app to upload a single file. Also available as a gist, based on http://pastie.caboo …
read moreWith Webfaction you can create new users with there own home area but there is no straight forward way to …
read moreThis feature of ruby keeps catching me out as the behaviour is quite unexpected (by me).
I can use a …
read moreRuby has a .sort method which sorts basic objects. it is case sensitive though so Zebra is before apple. Using …
read moreFluke for mac can be used to get iTunes playing FLAC audio files. However it is currently broken for Snow …
read moreI have just forked and cloned a project on github and discovered *.gemspec files. They are a nice way of …
read moreI recently discovered ||= in ruby. Its main use is for initialising a variable if it does not already exists, this …
read more[Update]
As this is a long post I am putting this update at the top. If you just want to …
When I install gems on my server I do not get any of the documentation which is normally 3-5 times …
read moreWhen displaying blog/articles it is often nice to have previous and next posts. Simply -1 +1 from the current …
read moreJust a short first note to announce the fact that the site is finally up.
We are running on WebFaction …
read moreSinatra 1.0 has been released!
When you install the new version the old one are still left behind. This …
read moreGit has a hand full of GUIs available on Mac OS X, gitk proved a little tricky to use but …
read moreI have been playing around with getting my blog posts timestamped I found the Ruby Time Docs to be very …
read more