Googlewhacking is finding a pair of words that give just a single hit on Google.
I have a word of the day desk calendar, todays word was "diddlecum" meaning Half mad or sorely teased (from Walter Skeat's Glossary of Devonshire Words, 1896).
This is what I got back from Google.
Thursday, 29 January 2015
Wednesday, 1 October 2014
A Strum and a Pick for the First of the Month
Guitar
I enjoyed my practice tonight, slight improvements on three of the songs and slightly more consistent with the playing of Higher Ground, the one song I'm waiting to complete in order to get the next stage completed.
It has been 65 days since I have played all of the songs I have been practising. It will take 3 hours 20 minutes to play through them all in one session.
Improved Songs
Slow Hands, Boss and We Share the Same Skies.Playlist
Higher Ground by Red Hot Chilli Peppers: Scored 82488.I Want Some More by Dan Auerbach: Scored 72787.
Boys Don't Cry by The Cure: Scored 73958.
Slow Hands by Interpol: Beaten previous high score of 97094 with 97817.
Boss by Chris Lee: Beaten previous high score of 10896 with 11663.
Number Thirteen by Red Fang: Scored 5310.
We Share the Same Skies by The Cribs: Beaten previous high score of 18547 with 22114. Beaten last streak with a streak of 40 notes. Beaten last percentage of notes right with 83%.
< br/>
Full song list
| Song | Artist(s) | Latest Score | Latest Score | Streak | Percentage |
|---|---|---|---|---|---|
| Higher Ground | Red Hot Chilli Peppers | 88698 | 82488 | 155 | 92 |
| I Want Some More | Dan Auerbach | 86629 | 72787 | 58 | 91 |
| Boys Don't Cry | The Cure | 94355 | 73958 | 79 | 91 |
| Slow Hands | Interpol | 97817 | 97817 | 233 | 97 |
| Boss | Chris Lee | 11663 | 11663 | 23 | 72 |
| Number Thirteen | Red Fang | 55166 | 5310 | 126 | 86 |
| We Share the Same Skies | The Cribs | 22114 | 22114 | 40 | 83 |
| Surf Hell | Little Barrie | 45568 | 42840 | 63 | 82 |
| Song 2 | Blur | 81736 | 80395 | 154 | 97 |
| Where is My Mind? | Pixies | 76970 | 76970 | 95 | 90 |
| Take Me Out | Franz Ferdinand | 67483 | 67483 | 105 | 82 |
| Use Somebody | Kings of Leon | 73745 | 65556 | 104 | 88 |
| Unnatural Selection | Muse | 53483 | 42135 | 97 | 86 |
| Ricochet | Brian Adam McCune | 30587 | 30587 | 29 | 80 |
| Jules | Seth Chapla | 30147 | 29194 | 63 | 75 |
| Well OK Honey | Jenny O | 48263 | 28596 | 22 | 72 |
| Run Back to Your Side | Eric Clapton | 22763 | 16779 | 20 | 71 |
| Do You Remember | The Horrors | 103326 | 79052 | 23 | 80 |
| High and Dry | Radiohead | 73334 | 59323 | 81 | 90 |
| Sweet Home Alabama | Lynyrd Skynyrd | 15980 | 14812 | 51 | 82 |
| A More Perfect Union | Titus Andronicus | 39300 | 36259 | 100 | 83 |
| California Brain | RapScallions | 24917 | 24917 | 54 | 81 |
| Outshined | Soundgarden | 50996 | 47265 | 54 | 83 |
| Icky Thump | The White Stripes | 57364 | 53643 | 79 | 87 |
| Slither | Velvet Revolver | 24683 | 18316 | 27 | 78 |
| In Bloom | Nirvana | 74179 | 69679 | 43 | 81 |
| Breed | Nirvana | 72322 | 72028 | 56 | 87 |
| Me and the Bean | Spoon | 57060 | 54923 | 68 | 87 |
| Vasoline | Stone Temple Pilots | 92261 | 85017 | 205 | 97 |
| Mean Bitch | Taddy Porter | 57779 | 56977 | 83 | 83 |
| I Got Mine | The Black Keys | 49686 | 49686 | 52 | 85 |
| When I'm with You | Best Coast | 41949 | 39215 | 76 | 91 |
| Plug In Baby | Muse | 46821 | 43846 | 114 | 93 |
| Panic Switch | Silversun Pickups | 64089 | 64089 | 106 | 84 |
| I Can't Hear You | The Dead Weather | 67594 | 67594 | 63 | 88 |
| Play with Fire | The Rolling Stones | 38127 | 36169 | 30 | 75 |
| Next Girl | The Black Keys | 113578 | 112679 | 191 | 99 |
| Step Out of the Car | The Boxer Rebellion | 45842 | 45842 | 34 | 81 |
| (I Can't Get No) Satisfaction | The Rolling Stones | 90167 | 77864 | 108 | 96 |
| Angela | Jarvis Cocker | 106878 | 95809 | 186 | 95 |
| Gobbledigook | Sigur Rós | 43953 | 48 | 88 | |
| I Miss You | Incubus | 29963 | 21522 | 39 | 79 |
| Sunshine of Your Love | Cream | 44550 | 41974 | 62 | 80 |
| Rebel Rebel | David Bowie | 57428 | 42878 | 87 | 87 |
| Islands | The xx | 23519 | 22254 | 43 | 86 |
| The Spider and the Fly | The Rolling Stones | 37943 | 28976 | 40 | 98 |
| House of the Rising Sun | The Animals | 47327 | 43675 | 152 | 93 |
| Good Enough | Tom Petty and the Heartbreakers | 41508 | 41508 | 26 | 72 |
| Burnished | White Denim | 29444 | 23335 | 74 | 92 |
| Chimney | The Yellow Moon Band | 26664 | 26664 | 44 | 75 |
| Are You Gonna Go My Way | Lenny Kravitz | 27378 | 22315 | 47 | 85 |
| Between the Lines | Stone Temple Pilots | 58501 | 41417 | 78 | 85 |
| Go With the Flow | Queens of the Stone Age | 168515 | 93459 | 541 | 97 |
Tuesday, 30 September 2014
A Rocksmith 2014 night
Bass
The only thing that bugs me about Rocksmith 2014 is that the scoring system is almost totally different. The only thing in common between the two is they both track the streak of correctly played notes.
I spent most of the time working on Stay In by Jaws going from 33% overall score to 94.8% overall. This is near the point at which Rocksmith will automatically put you into master mode.
In master mode the notes to play are hidden from view, so you have to play from memory. In other words you have learnt the song. For me, it will take more than a few dozen plays of a song to have it anywhere near memorised.
If I put the PS online, I can get a tool to convert the older tracks into the newer format. I'm still undecided about doing this - benefits would be the same scoring across both, but the disadvantage is I don't know how the original game progress would be carried forward.
Lessons Attempted
One of the key things on the game is the tutorial lessons. Today I tried two.
Shifting 101B
Shifting is moving your fingers onto the correct position on the fretboard to play the next note. Probably an important concept in the whole scheme of guitar playing. You also get scored on how well you play these -- I got 100% accuracy and 60.7% overall (as you get better, you get more notes to play in the tutorials too).
Sustains 101B
A sustain is picking (or plucking) a note and letting it ring out for longer than usual - some can last for several bars of the song. I got 100% accuracy and 100% overall - quite happy with this.
Unlocks today
Well, children, today I unlocked a Level 4 venue. I understand the different venues on the original Rocksmith, but have no idea how they work on this version of the game. I'm wondering if there is an entire mode to the game I haven't had a look at year.
I also unlocked a CL-5S skin and a Marsall Plexi skin.
Time played
As far as time played goes, I spent around 100 minutes wall-clock time most of which was actually playing songs. This figure isn't counted in the total time played. That only measures the time actually playing full songs and doesn't include time going through the tutorials or playing the mini-games.
It has been 62 days since I have played all of the songs I have been practising. It will take 3 hours 55 minutes to play through them all in one session.
Improved Songs
Stay In, Every Breath You Take, Paint It, Black, Losing My Religion, Knights of Cydonia and R U MinePlaylist
Stay In by Jaws: Equalled previous high score of 0.Pour Some Sugar on Me by Def Leppard: Equalled previous high score of 0.
Every Breath You Take by The Police: Equalled previous high score of 0.
Paint It, Black by The Rolling Stones: Equalled previous high score of 0.
Losing My Religion by REM: Equalled previous high score of 0.
Knights of Cydonia by Muse: Equalled previous high score of 0.
R U Mine by Arctic Monkets: Equalled previous high score of 0.
< br/>
Full song list
| Song | Artist(s) | Latest Score | Latest Score | Streak | Percentage |
|---|---|---|---|---|---|
| Stay In | Jaws | 61 | 94 | ||
| Pour Some Sugar on Me | Def Leppard | 48 | 88 | ||
| Every Breath You Take | The Police | 43 | 93 | ||
| Paint It, Black | The Rolling Stones | 113 | 90 | ||
| Losing My Religion | REM | 25 | 87 | ||
| Knights of Cydonia | Muse | 56 | 83 | ||
| R U Mine | Arctic Monkets | 16 | 83 | ||
| Are You Gonna Go My Way | Lenny Kravitz | 39520 | 39520 | ||
| Take Me Out | Franz Ferdinand | 58204 | 50646 | 36 | 76 |
| Mean Bitch | Taddy Porter | 89733 | 88233 | 116 | 87 |
| House of the Rising Sun | The Animals | 97160 | 97160 | 57 | 88 |
| Number Thirteen | Red Fang | 38664 | 38664 | 56 | 78 |
| Angela | Jarvis Cocker | 105640 | 105640 | 146 | 99 |
| Good Enough | Tom Petty and the Heartbreakers | 97746 | 83541 | 46 | 81 |
| High and Dry | Radiohead | 68257 | 67944 | 45 | 79 |
| Ricochet | Brian Adam McCune | 34404 | 30575 | 14 | 66 |
| A More Perfect Union | Titus Andronicus | 66157 | 66157 | 69 | 86 |
| I Got Mine | The Black Keys | 62841 | 62841 | 51 | 83 |
| The Spider and the Fly | The Rolling Stones | 65734 | 65734 | 45 | 80 |
| Higher Ground | Red Hot Chilli Peppers | 23787 | 17378 | 17 | 60 |
| Step Out of the Car | The Boxer Rebellion | 46936 | 30674 | 53 | 84 |
| Panic Switch | Silversun Pickups | 63089 | 56813 | 85 | 81 |
| Between the Lines | Stone Temple Pilots | 45582 | 42145 | 47 | 82 |
| Song 2 | Blur | 53274 | 53274 | 61 | 89 |
| We Share the Same Skies | The Cribs | 42364 | 42364 | 72 | 86 |
| Under Cover of Darkness | The Strokes | 52000 | 52000 | 46 | 81 |
| I Want Some More | Dan Auerbach | 59872 | 59161 | 20 | 81 |
| Surf Hell | Little Barrie | 55450 | 55450 | 21 | 75 |
| Use Somebody | Kings of Leon | 65934 | 65934 | 48 | 88 |
| Slither | Velvet Revolver | 54709 | 48777 | 105 | 87 |
| Boss | Chris Lee | 26880 | 26880 | 32 | 85 |
| Unnatural Selection | Muse | 28930 | 28785 | 42 | 76 |
| Plug In Baby | Muse | 42036 | 42036 | 45 | 87 |
| California Brain | RapScallions | 55984 | 55984 | 119 | 89 |
| Sweet Home Alabama | Lynyrd Skynyrd | 58672 | 58672 | 45 | 74 |
| Outshined | Soundgarden | 61332 | 61332 | 42 | 77 |
| Slow Hands | Interpol | 33467 | 33467 | 33 | 72 |
| I Can't Hear You | The Dead Weather | 132442 | 132442 | 22 | 90 |
| Burnished | White Denim | 25160 | 25160 | 28 | 74 |
| Run Back to Your Side | Eric Clapton | 37568 | 37568 | 50 | 76 |
| Islands | The xx | 94407 | 84284 | 80 | 87 |
| Jules | Seth Chapla | 77159 | 77159 | 71 | 93 |
| In Bloom | Nirvana | 56211 | 56211 | 51 | 88 |
| Me and the Bean | Spoon | 71649 | 71649 | 43 | 85 |
| Vasoline | Stone Temple Pilots | 98894 | 91786 | 83 | 88 |
| Do You Remember | The Horrors | 109014 | 107672 | 132 | 96 |
| Go With the Flow | Queens of the Stone Age | 84741 | 82511 | 98 | 86 |
| Boys Don't Cry | The Cure | 35618 | 35618 | 33 | 77 |
| Space Ostrich | Disonaur | 39637 | 39637 | 29 | 81 |
| Breed | Nirvana | 63878 | 63876 | 61 | 86 |
| Next Girl | The Black Keys | 111302 | 107653 | 177 | 97 |
| Chimney | The Yellow Moon Band | 101481 | 99019 | 148 | 97 |
| Where is My Mind? | Pixies | 100813 | 100813 | 119 | 93 |
| Gobbledigook | Sigur Rós | 109655 | 109655 | 63 | 91 |
| Well OK Honey | Jenny O | 69112 | 69112 | 48 | 87 |
| Sunshine of Your Love | Cream | 47630 | 41570 | 30 | 77 |
| (I Can't Get No) Satisfaction | The Rolling Stones | 57563 | 56213 | 65 | 80 |
Monday, 29 September 2014
Split session
Bass
I played half of the songs yesterday, but got sidetracked into taking James into town to get his bus back to Cleckheaton.
It has been 61 days since I have played all of the songs I have been practising. It will take 3 hours 28 minutes to play through them all in one session.
Improved Songs
Angela, Good Enough, I Got Mine, The Spider and the Fly, Rebel RebelPlaylist
Angela by Jarvis Cocker: Beaten previous high score of 105637 with 105640.Good Enough by Tom Petty and the Heartbreakers: Scored 83541. Beaten last streak with a streak of 46 notes.
High and Dry by Radiohead: Scored 67944.
Ricochet by Brian Adam McCune: Scored 30575.
I Got Mine by The Black Keys: Beaten previous high score of 53433 with 62841.
The Spider and the Fly by The Rolling Stones: Beaten previous high score of 61100 with 65734.
Sunshine of Your Love by Cream: Scored 41570.
Rebel Rebel by David Bowie: Beaten previous high score of 40240 with 41692.
(I Can't Get No) Satisfaction by The Rolling Stones: Scored 56213.
< br/>
Full song list
| Song | Artist(s) | Latest Score | Latest Score | Streak | Percentage |
|---|---|---|---|---|---|
| Angela | Jarvis Cocker | 105640 | 105640 | 146 | 99 |
| Good Enough | Tom Petty and the Heartbreakers | 97746 | 83541 | 46 | 81 |
| High and Dry | Radiohead | 68257 | 67944 | 45 | 79 |
| Ricochet | Brian Adam McCune | 34404 | 30575 | 14 | 66 |
| I Got Mine | The Black Keys | 62841 | 62841 | 51 | 83 |
| The Spider and the Fly | The Rolling Stones | 65734 | 65734 | 45 | 80 |
| Sunshine of Your Love | Cream | 47630 | 41570 | 30 | 77 |
| Rebel Rebel | David Bowie | 41692 | 41692 | 40 | 84 |
| (I Can't Get No) Satisfaction | The Rolling Stones | 57563 | 56213 | 65 | 80 |
| Are You Gonna Go My Way | Lenny Kravitz | 39520 | 39520 | ||
| Take Me Out | Franz Ferdinand | 58204 | 50646 | 36 | 76 |
| A More Perfect Union | Titus Andronicus | 66157 | 66157 | 69 | 86 |
| Higher Ground | Red Hot Chilli Peppers | 23787 | 17378 | 17 | 60 |
| Step Out of the Car | The Boxer Rebellion | 46936 | 30674 | 53 | 84 |
| Mean Bitch | Taddy Porter | 89733 | 88233 | 116 | 87 |
| House of the Rising Sun | The Animals | 97160 | 97160 | 57 | 88 |
| Panic Switch | Silversun Pickups | 63089 | 56813 | 85 | 81 |
| Between the Lines | Stone Temple Pilots | 45582 | 42145 | 47 | 82 |
| Pour Some Sugar on Me | Def Leppard | 48 | 88 | ||
| Number Thirteen | Red Fang | 38664 | 38664 | 56 | 78 |
| Song 2 | Blur | 53274 | 53274 | 61 | 89 |
| We Share the Same Skies | The Cribs | 42364 | 42364 | 72 | 86 |
| Under Cover of Darkness | The Strokes | 52000 | 52000 | 46 | 81 |
| I Want Some More | Dan Auerbach | 59872 | 59161 | 20 | 81 |
| Surf Hell | Little Barrie | 55450 | 55450 | 21 | 75 |
| Use Somebody | Kings of Leon | 65934 | 65934 | 48 | 88 |
| Slither | Velvet Revolver | 54709 | 48777 | 105 | 87 |
| Boss | Chris Lee | 26880 | 26880 | 32 | 85 |
| Unnatural Selection | Muse | 28930 | 28785 | 42 | 76 |
| Plug In Baby | Muse | 42036 | 42036 | 45 | 87 |
| California Brain | RapScallions | 55984 | 55984 | 119 | 89 |
| Sweet Home Alabama | Lynyrd Skynyrd | 58672 | 58672 | 45 | 74 |
| Outshined | Soundgarden | 61332 | 61332 | 42 | 77 |
| Slow Hands | Interpol | 33467 | 33467 | 33 | 72 |
| I Can't Hear You | The Dead Weather | 132442 | 132442 | 22 | 90 |
| Burnished | White Denim | 25160 | 25160 | 28 | 74 |
| Run Back to Your Side | Eric Clapton | 37568 | 37568 | 50 | 76 |
| Islands | The xx | 94407 | 84284 | 80 | 87 |
| Jules | Seth Chapla | 77159 | 77159 | 71 | 93 |
| In Bloom | Nirvana | 56211 | 56211 | 51 | 88 |
| Me and the Bean | Spoon | 71649 | 71649 | 43 | 85 |
| Vasoline | Stone Temple Pilots | 98894 | 91786 | 83 | 88 |
| Do You Remember | The Horrors | 109014 | 107672 | 132 | 96 |
| Go With the Flow | Queens of the Stone Age | 84741 | 82511 | 98 | 86 |
| Boys Don't Cry | The Cure | 35618 | 35618 | 33 | 77 |
| Space Ostrich | Disonaur | 39637 | 39637 | 29 | 81 |
| Breed | Nirvana | 63878 | 63876 | 61 | 86 |
| Next Girl | The Black Keys | 111302 | 107653 | 177 | 97 |
| Chimney | The Yellow Moon Band | 101481 | 99019 | 148 | 97 |
| Where is My Mind? | Pixies | 100813 | 100813 | 119 | 93 |
| Gobbledigook | Sigur Rós | 109655 | 109655 | 63 | 91 |
| Well OK Honey | Jenny O | 69112 | 69112 | 48 | 87 |
| I Miss You | Incubus | 133824 | 132357 | 25 | 91 |
First practice for ages
Guitar
I played 11 songs for 38 minutes. I have played for 132 hours 17 minutes in total with 9867 hours 43 minutes to go before I reach the point at which you are supposed to become an expert at an activity.It has been 63 days since I have played all of the songs I have been practising. It will take 3 hours 20 minutes to play through them all in one session.
Improved Songs
Boss, Take Me OutPlaylist
Higher Ground by Red Hot Chilli Peppers: Scored 81836.I Want Some More by Dan Auerbach: Scored 65595.
Slow Hands by Interpol: Scored 92229.
Boys Don't Cry by The Cure: Scored 79573.
Boss by Chris Lee: Scored 8876. Beaten last streak with a streak of 23 notes.
Take Me Out by Franz Ferdinand: Beaten previous high score of 64621 with 67483. Beaten last streak with a streak of 105 notes.
Between the Lines by Stone Temple Pilots: Scored 41417.
Are You Gonna Go My Way by Lenny Kravitz: Scored 22315.
< br/>
Full song list
| Song | Artist(s) | Latest Score | Latest Score | Streak | Percentage |
|---|---|---|---|---|---|
| Higher Ground | Red Hot Chilli Peppers | 88698 | 81836 | 155 | 92 |
| I Want Some More | Dan Auerbach | 86629 | 65595 | 58 | 91 |
| Slow Hands | Interpol | 97094 | 92229 | 233 | 97 |
| Boys Don't Cry | The Cure | 94355 | 79573 | 79 | 91 |
| Boss | Chris Lee | 10896 | 8876 | 23 | 72 |
| Take Me Out | Franz Ferdinand | 67483 | 67483 | 105 | 82 |
| Between the Lines | Stone Temple Pilots | 58501 | 41417 | 78 | 85 |
| Are You Gonna Go My Way | Lenny Kravitz | 27378 | 22315 | 47 | 85 |
| Number Thirteen | Red Fang | 55166 | 49887 | 126 | 86 |
| Surf Hell | Little Barrie | 45568 | 42840 | 63 | 82 |
| Song 2 | Blur | 81736 | 80395 | 154 | 97 |
| Where is My Mind? | Pixies | 76970 | 76970 | 95 | 90 |
| Use Somebody | Kings of Leon | 73745 | 65556 | 104 | 88 |
| Unnatural Selection | Muse | 53483 | 42135 | 97 | 86 |
| Ricochet | Brian Adam McCune | 30587 | 30587 | 29 | 80 |
| Jules | Seth Chapla | 30147 | 29194 | 63 | 75 |
| Well OK Honey | Jenny O | 48263 | 28596 | 22 | 72 |
| Run Back to Your Side | Eric Clapton | 22763 | 16779 | 20 | 71 |
| Do You Remember | The Horrors | 103326 | 79052 | 23 | 80 |
| High and Dry | Radiohead | 73334 | 59323 | 81 | 90 |
| We Share the Same Skies | The Cribs | 18547 | 16877 | 32 | 79 |
| Sweet Home Alabama | Lynyrd Skynyrd | 15980 | 14812 | 51 | 82 |
| A More Perfect Union | Titus Andronicus | 39300 | 36259 | 100 | 83 |
| California Brain | RapScallions | 24917 | 24917 | 54 | 81 |
| Outshined | Soundgarden | 50996 | 47265 | 54 | 83 |
| Icky Thump | The White Stripes | 57364 | 53643 | 79 | 87 |
| Slither | Velvet Revolver | 24683 | 18316 | 27 | 78 |
| In Bloom | Nirvana | 74179 | 69679 | 43 | 81 |
| Breed | Nirvana | 72322 | 72028 | 56 | 87 |
| Me and the Bean | Spoon | 57060 | 54923 | 68 | 87 |
| Vasoline | Stone Temple Pilots | 92261 | 85017 | 205 | 97 |
| Mean Bitch | Taddy Porter | 57779 | 56977 | 83 | 83 |
| I Got Mine | The Black Keys | 49686 | 49686 | 52 | 85 |
| When I'm with You | Best Coast | 41949 | 39215 | 76 | 91 |
| Plug In Baby | Muse | 46821 | 43846 | 114 | 93 |
| Panic Switch | Silversun Pickups | 64089 | 64089 | 106 | 84 |
| I Can't Hear You | The Dead Weather | 67594 | 67594 | 63 | 88 |
| Play with Fire | The Rolling Stones | 38127 | 36169 | 30 | 75 |
| Next Girl | The Black Keys | 113578 | 112679 | 191 | 99 |
| Step Out of the Car | The Boxer Rebellion | 45842 | 45842 | 34 | 81 |
| (I Can't Get No) Satisfaction | The Rolling Stones | 90167 | 77864 | 108 | 96 |
| Angela | Jarvis Cocker | 106878 | 95809 | 186 | 95 |
| Gobbledigook | Sigur Rós | 43953 | 48 | 88 | |
| I Miss You | Incubus | 29963 | 21522 | 39 | 79 |
| Sunshine of Your Love | Cream | 44550 | 41974 | 62 | 80 |
| Rebel Rebel | David Bowie | 57428 | 42878 | 87 | 87 |
| Islands | The xx | 23519 | 22254 | 43 | 86 |
| The Spider and the Fly | The Rolling Stones | 37943 | 28976 | 40 | 98 |
| House of the Rising Sun | The Animals | 47327 | 43675 | 152 | 93 |
| Good Enough | Tom Petty and the Heartbreakers | 41508 | 41508 | 26 | 72 |
| Burnished | White Denim | 29444 | 23335 | 74 | 92 |
| Chimney | The Yellow Moon Band | 26664 | 26664 | 44 | 75 |
| Go With the Flow | Queens of the Stone Age | 168515 | 93459 | 541 | 97 |
Monday, 8 September 2014
Getting a raspberry pi to show videos at start up.
A side project today at work was to get the Raspberry Pi to automatically display video files for our partner company.
The first part was getting the files to loop, I used the script from the learn adafruit site.
#!/bin/sh # get rid of the cursor so we don't see it when videos are running setterm -cursor off # set here the path to the directory containing your videos VIDEOPATH="/mnt/storage/videos" # you can normally leave this alone SERVICE="omxplayer" # now for our infinite loop! while true; do if ps ax | grep -v grep | grep $SERVICE > /dev/null then sleep 1; else for entry in $VIDEOPATH/* do clear omxplayer $entry > /dev/null done fi done
That was the easy bit.
The more challenging part was to autoplay the script on startup. After a number of fruitless trials, I discovered the raspberrypi.stackexchange font of wisdom.
Basically all you need to do is to add a line calling the script into the /etc/xdg/lxsession/LXDE/autostart file.
@/home/pi/bin/videoplayer.sh
Knowing the SSH address of the pi is helpful to safely shutdown - or just pull the power ;-)
The more challenging part was to autoplay the script on startup. After a number of fruitless trials, I discovered the raspberrypi.stackexchange font of wisdom.
Basically all you need to do is to add a line calling the script into the /etc/xdg/lxsession/LXDE/autostart file.
@/home/pi/bin/videoplayer.sh
Knowing the SSH address of the pi is helpful to safely shutdown - or just pull the power ;-)
Sunday, 27 July 2014
Adding Firstname, middle name and last names to a Ruby on Rails app
I was wanting to add first name, middle name and last name columns to a Ruby on Rails application (specifically the Rails-Devise tutorial from RailsApps).
After a couple of hours working through various sites I came up with three migrations:
timestamp_add_first_last_to_users.rb
class AddFirstLastToUsers < ActiveRecord::Migration
def self.up
change_table :users do |t|
add_column :users, :first_name, :string
add_column :users, :middle_name, :string
add_column :users, :last_name, :string
end
end
def self.down
remove_column :users, :first_name
remove_column :users, :middle_name
remove_column :users, :last_name
end
end
timestamp_update_names_to_users
class UpdateNamesToUsers < ActiveRecord::Migration
def up
User.all.each do |user|
na=user.name.split(" ")
nc=na.size
user.first_name=na[0]
user.last_name=na.last if na.size>1
user.middle_name= na[1..na.size-1].join(" ") if na.size>2
user.save!
end
end
def down
User.all.each do |user|
user.name = [user.first_name, user.middle_name, user.last_name].compact.join(" ")
user.save!
end
end
end
timestamp_remove_name_from_users.rb
class RemoveNameFromUsers < ActiveRecord::Migration
def up
remove_column :users, :name, :string
end
def down
add_column :users, :name, :string
end
end
This works, but is probably not the best solution.
If you have an easier way, please feel free to let me know.
After a couple of hours working through various sites I came up with three migrations:
timestamp_add_first_last_to_users.rb
class AddFirstLastToUsers < ActiveRecord::Migration
def self.up
change_table :users do |t|
add_column :users, :first_name, :string
add_column :users, :middle_name, :string
add_column :users, :last_name, :string
end
end
def self.down
remove_column :users, :first_name
remove_column :users, :middle_name
remove_column :users, :last_name
end
end
timestamp_update_names_to_users
class UpdateNamesToUsers < ActiveRecord::Migration
def up
User.all.each do |user|
na=user.name.split(" ")
nc=na.size
user.first_name=na[0]
user.last_name=na.last if na.size>1
user.middle_name= na[1..na.size-1].join(" ") if na.size>2
user.save!
end
end
def down
User.all.each do |user|
user.name = [user.first_name, user.middle_name, user.last_name].compact.join(" ")
user.save!
end
end
end
class RemoveNameFromUsers < ActiveRecord::Migration
def up
remove_column :users, :name, :string
end
def down
add_column :users, :name, :string
end
end
This works, but is probably not the best solution.
If you have an easier way, please feel free to let me know.
Subscribe to:
Posts (Atom)
