9cf80962f255946de3eec8fa6f898c38d962252c
Code/AwkRenumber.md
... | ... | @@ -27,4 +27,4 @@ Used to rename TV show episodes. Original files had episode number spanning the |
27 | 27 | * For each file in the directory (in timestamp order) |
28 | 28 | * Replace episode number with the line number (with a leading zero if necessary) |
29 | 29 | * Print "mv ", the old name, and the new name |
30 | -* Pipe it to /bin/sh |
|
... | ... | \ No newline at end of file |
0 | +* Pipe it to /bin/sh |
MediaCentre/Games.md
... | ... | @@ -14,10 +14,9 @@ The script: |
14 | 14 | # Auto-mount [ROMs][2][?][2] from CIFS |
15 | 15 | |
16 | 16 | ## Configure [AutoFS][3][?][3] |
17 | - |
|
17 | +``` |
|
18 | 18 | sudo apt-get install autofs |
19 | - |
|
20 | -[[$[Get Code]]][4] |
|
19 | +``` |
|
21 | 20 | |
22 | 21 | `/etc/auto.mediasys` |
23 | 22 | |
... | ... | @@ -71,4 +70,3 @@ This combination mounts `//media/mediasys` as `/mnt/mediasys`. |
71 | 70 | [2]: MediaCentre.ROMs?action=edit |
72 | 71 | [3]: MediaCentre.AutoFS?action=edit |
73 | 72 | [5]: MediaCentre.EmulationStation?action=edit |
74 | - [6]: MediaCentre.Games?action=sourceblock&num=2 |
MediaCentre/MultiRoomAudio.md
... | ... | @@ -267,11 +267,12 @@ Note that snapclient on volumio is symlinked to `/usr/sbin/snapclient`. The defa |
267 | 267 | |
268 | 268 | Install with: |
269 | 269 | |
270 | +``` |
|
270 | 271 | sudo systemctl enable snapclient@1 |
271 | 272 | sudo systemctl enable snapclient@2 |
272 | 273 | ...etc.. |
273 | 274 | |
274 | -[[$[Get Code]]][51] |
|
275 | +``` |
|
275 | 276 | |
276 | 277 | |
277 | 278 | |
... | ... | @@ -324,13 +325,12 @@ Depends on snapserver. Using TCP ports 22120-22129. |
324 | 325 | |
325 | 326 | Install with: |
326 | 327 | |
328 | +``` |
|
327 | 329 | sudo systemctl enable librespot@1 |
328 | 330 | sudo systemctl enable librespot@2 |
329 | 331 | ...etc.. |
330 | 332 | |
331 | -[[$[Get Code]]][52] |
|
332 | - |
|
333 | - |
|
333 | +``` |
|
334 | 334 | |
335 | 335 | ## 5.4 shairport-sync |
336 | 336 | |
... | ... | @@ -344,6 +344,7 @@ Packages available from: <https://www.lesbonscomptes.com/upmpdcli/downloads.html |
344 | 344 | |
345 | 345 | ### Install |
346 | 346 | |
347 | +``` |
|
347 | 348 | # Depends on libjsoncpp0: |
348 | 349 | echo "deb http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi" >> /etc/apt/sources.list.d/raspbian.list |
349 | 350 | apt-key adv --keyserver pool.sks-keyservers.net --recv-keys F8E3347256922A8AE767605B7808CE96D38B9201 |
... | ... | @@ -351,7 +352,7 @@ echo "deb http://www.lesbonscomptes.com/upmpdcli/downloads/raspbian/ stretch mai |
351 | 352 | apt-get update |
352 | 353 | apt-get install upmpdcli |
353 | 354 | |
354 | -[[$[Get Code]]][53] |
|
355 | +``` |
|
355 | 356 | |
356 | 357 | |
357 | 358 | |
... | ... | @@ -414,6 +415,3 @@ Two settings needed: |
414 | 415 | [48]: https://github.com/badaix/snapcast/releases/download/v0.11.1/snapserver_0.11.1_amd64.deb |
415 | 416 | [49]: https://github.com/badaix/snapcast/releases/download/v0.11.1/Snapcast_0.11.1.apk |
416 | 417 | [50]: https://github.com/badaix/snapcast/releases/download/v0.11.1/snapclient_0.11.1_armhf.deb |
417 | - [51]: MediaCentre.MultiRoomAudio?action=sourceblock&num=1 |
|
418 | - [52]: MediaCentre.MultiRoomAudio?action=sourceblock&num=2 |
|
419 | - [53]: MediaCentre.MultiRoomAudio?action=sourceblock&num=3 |
|
... | ... | \ No newline at end of file |
MediaCentre/N770.md
... | ... | @@ -101,4 +101,4 @@ Supports only embedded art |
101 | 101 | [3]: MediaCentre.UPnP |
102 | 102 | [4]: http://maemo.org/community/wiki/VideoEncoding/#c1ff7c8ab3ea4123fc2d5fb6a105d98b |
103 | 103 | [5]: http://gentoo-wiki.com/HOWTO_MediaTomb#Using_FFmpeg |
104 | - [6]: http://vagalume.igalia.com/ |
|
... | ... | \ No newline at end of file |
0 | + [6]: http://vagalume.igalia.com/ |
MediaCentre/RaspBMC.md
... | ... | @@ -24,9 +24,9 @@ OS |
24 | 24 | |
25 | 25 | ## Hostname |
26 | 26 | |
27 | +``` |
|
27 | 28 | sudo hostname lounge |
28 | - |
|
29 | -[[$[Get Code]]][5] |
|
29 | +``` |
|
30 | 30 | |
31 | 31 | Edit `/etc/hostname`: |
32 | 32 | |
... | ... | @@ -39,11 +39,10 @@ Edit `/etc/hostname`: |
39 | 39 | |
40 | 40 | ## kodi and systemd |
41 | 41 | |
42 | +``` |
|
42 | 43 | sudo systemctl stop mediacenter |
43 | 44 | sudo systemctl start mediacenter |
44 | - |
|
45 | -[[$[Get Code]]][6] |
|
46 | - |
|
45 | +``` |
|
47 | 46 | |
48 | 47 | |
49 | 48 | ## Network |
... | ... | @@ -65,21 +64,17 @@ sudo systemctl start mediacenter |
65 | 64 | |
66 | 65 | ## SNMP |
67 | 66 | |
68 | - |
|
67 | +``` |
|
69 | 68 | **GeSHi Error:** GeSHi could not find the language bashapt-get (using path /var/www/data/mark/pmwiki/cookbook/geshi/geshi/) (code 2) |
70 | 69 | |
71 | - |
|
72 | -[[$[Get Code]]][7] |
|
73 | - |
|
74 | - |
|
70 | +``` |
|
75 | 71 | |
76 | 72 | ### Installing |
77 | 73 | |
74 | +``` |
|
78 | 75 | apt-get install v4l-utils libjpeg9 |
79 | 76 | |
80 | -[[$[Get Code]]][8] |
|
81 | - |
|
82 | - |
|
77 | +``` |
|
83 | 78 | |
84 | 79 | ## Fixing Blue Screen |
85 | 80 | |
... | ... | @@ -87,11 +82,12 @@ Blue screen (on Study TV after power cycle). |
87 | 82 | |
88 | 83 | Workaround: |
89 | 84 | |
85 | +``` |
|
90 | 86 | tvservice -o |
91 | 87 | tvservice -p |
92 | 88 | sudo systemctl restart mediacenter |
93 | 89 | |
94 | -[[$[Get Code]]][9] |
|
90 | +``` |
|
95 | 91 | |
96 | 92 | See [related OSMC issue][10]. |
97 | 93 | |
... | ... | @@ -182,7 +178,7 @@ Rootfs |
182 | 178 | : [Latest RaspBMC image][14]) from <http://downloads.raspberrypi.org> |
183 | 179 | |
184 | 180 | |
185 | - |
|
181 | +``` |
|
186 | 182 | #!/bin/bash |
187 | 183 | |
188 | 184 | KERNEL=xec-kernel |
... | ... | @@ -197,9 +193,7 @@ qemu-system-arm \ |
197 | 193 | -hda "$ROOT" \ |
198 | 194 | -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" |
199 | 195 | |
200 | - |
|
201 | -[[$[Get Code]]][15] |
|
202 | - |
|
196 | +``` |
|
203 | 197 | |
204 | 198 | |
205 | 199 | ## Other Methods |
... | ... | @@ -229,14 +223,8 @@ Gave up with pkg-config problems after a while. |
229 | 223 | [2]: MediaCentre.RPi2?action=edit |
230 | 224 | [3]: MediaCentre.RPi1?action=edit |
231 | 225 | [4]: House.WhaleBarnMedia |
232 | - [5]: MediaCentre.RaspBMC?action=sourceblock&num=1 |
|
233 | - [6]: MediaCentre.RaspBMC?action=sourceblock&num=2 |
|
234 | - [7]: MediaCentre.RaspBMC?action=sourceblock&num=3 |
|
235 | - [8]: MediaCentre.RaspBMC?action=sourceblock&num=4 |
|
236 | - [9]: MediaCentre.RaspBMC?action=sourceblock&num=5 |
|
237 | 226 | [10]: https://discourse.osmc.tv/t/black-screen-on-hdmi/7599/29 |
238 | 227 | [11]: MediaCentre.RPi?action=edit |
239 | 228 | [12]: MediaCentre.RaspBMC |
240 | 229 | [13]: https://packages.debian.org/wheezy-backports/qemu |
241 | 230 | [14]: http://downloads.raspberrypi.org/raspbmc_latest |
242 | - [15]: MediaCentre.RaspBMC?action=sourceblock&num=6 |
|
... | ... | \ No newline at end of file |
MediaCentre/VoiceRecognition.md
... | ... | @@ -198,15 +198,12 @@ For split active and passive STT we need pocketsphinx and related packages. |
198 | 198 | |
199 | 199 | For [RPi2][7][?][7] (armv7) we can use packages from Debian experimental: |
200 | 200 | |
201 | - |
|
202 | - |
|
201 | +``` |
|
203 | 202 | sudo su -c "echo 'deb http://ftp.debian.org/debian experimental main contrib non-free' > /etc/apt/sources.list.d/experimental.list" |
204 | 203 | sudo apt-get update |
205 | 204 | sudo apt-get -t experimental install cmuclmtk phonetisaurus m2m-aligner mitlm libfst-tools libfst1-plugins-base libfst-dev |
206 | 205 | |
207 | -[[$[Get Code]]][8] |
|
208 | - |
|
209 | - |
|
206 | +``` |
|
210 | 207 | |
211 | 208 | ## [RPi1][9][?][9] Installation |
212 | 209 | |
... | ... | @@ -216,6 +213,7 @@ For [RPi1][9][?][9] (armv6) we can't use packages from Debian experimental so mu |
216 | 213 | |
217 | 214 | ### Install cognomen packages |
218 | 215 | |
216 | +``` |
|
219 | 217 | # add repo |
220 | 218 | sudo su -c "echo 'deb http://cognomen.co.uk/apt/debian jessie main' > /etc/apt/sources.list.d/cognomen.list" |
221 | 219 | # import pgp key |
... | ... | @@ -224,9 +222,7 @@ gpg --keyserver keyserver.ubuntu.com --recv FC88E181D61C9391C4A49682CF36B219807 |
224 | 222 | sudo apt-get update |
225 | 223 | sudo apt-get install pocketsphinx pocketsphinx-hmm-en-hub4wsj python-pocketsphinx python-yaml phonetisaurus m2m-aligner mitlm libfst-tools libfst1-plugins-base libfst-dev cmuclmtk python-semantic |
226 | 224 | |
227 | - |
|
228 | -[[$[Get Code]]][10] |
|
229 | - |
|
225 | +``` |
|
230 | 226 | |
231 | 227 | |
232 | 228 | ## Building [RPi1][9][?][9] dependencies from source |
... | ... | @@ -239,11 +235,12 @@ Don't need `crosstool-ng` can use prebuilt raspberrypi-tools x86-32 linaro cross |
239 | 235 | |
240 | 236 | ### Naïve openfst cross-compile |
241 | 237 | |
238 | +``` |
|
242 | 239 | export PATH=~/src/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH |
243 | 240 | ./configure --host arm-linux-gnueabihf --enable-compact-fsts --enable-const-fsts --enable-far --enable-lookahead-fsts --enable-pdt |
244 | 241 | make -j 8 |
245 | 242 | |
246 | -[[$[Get Code]]][11] |
|
243 | +``` |
|
247 | 244 | |
248 | 245 | Cross compilation works but [Debian RaspberryPi Packaging][12] doesn't. |
249 | 246 | |
... | ... | @@ -368,4 +365,4 @@ rm file.flac > /dev/null 2>&1 |
368 | 365 | [19]: MediaCentre.VoiceRecognition?action=sourceblock&num=9 |
369 | 366 | [20]: MediaCentre.VoiceRecognition?action=sourceblock&num=10 |
370 | 367 | [21]: https://github.com/kempniu/kodivc |
371 | - [22]: MediaCentre.VoiceRecognition?action=sourceblock&num=11 |
|
... | ... | \ No newline at end of file |
0 | + [22]: MediaCentre.VoiceRecognition?action=sourceblock&num=11 |
PIM/Mail.md
... | ... | @@ -88,17 +88,17 @@ A little python dictionary of credentials to isolate it from the rest of the (ve |
88 | 88 | |
89 | 89 | `~/.auth.py`: |
90 | 90 | |
91 | +``` |
|
91 | 92 | auth = dict() |
92 | 93 | auth['blah@markferry.net'] = 'My obvious password' |
93 | 94 | |
94 | -[[$[Get Code]]][3] |
|
95 | - |
|
96 | - |
|
95 | +``` |
|
97 | 96 | |
98 | 97 | ## offlineimap-watchdog |
99 | 98 | |
100 | 99 | Adapted for bash from the [offlineimap FAQ][4] |
101 | 100 | |
101 | +``` |
|
102 | 102 | #!/bin/sh |
103 | 103 | # remove any old instances of this shell script or offlineimap |
104 | 104 | for pid in $(pgrep offlineimap) |
... | ... | @@ -119,9 +119,7 @@ do |
119 | 119 | sleep 60 # prevents extended failure condition |
120 | 120 | done |
121 | 121 | |
122 | -[[$[Get Code]]][5] |
|
123 | - |
|
124 | - |
|
122 | +``` |
|
125 | 123 | |
126 | 124 | # Links |
127 | 125 | |
... | ... | @@ -130,7 +128,5 @@ done |
130 | 128 | |
131 | 129 | [1]: Tech.Mutt |
132 | 130 | [2]: http://isync.sourceforge.net/ |
133 | - [3]: PIM.Mail?action=sourceblock&num=1 |
|
134 | 131 | [4]: http://docs.offlineimap.org/en/latest/FAQ.html#what-can-i-do-to-ensure-offlineimap-is-still-running-and-hasnt-crashed |
135 | - [5]: PIM.Mail?action=sourceblock&num=2 |
|
136 | - [6]: http://blog.developwithpassion.com/2013/05/02/getting-up-and-running-with-a-sane-mutt-setup/ |
|
... | ... | \ No newline at end of file |
0 | + [6]: http://blog.developwithpassion.com/2013/05/02/getting-up-and-running-with-a-sane-mutt-setup/ |
Tech/DWM.md
... | ... | @@ -22,21 +22,25 @@ |
22 | 22 | |
23 | 23 | # Status Bar |
24 | 24 | |
25 | +```bash |
|
25 | 26 | #!/bin/sh |
26 | 27 | DISPLAY=:0.0 xsetroot -name "$(date '+%F %R %Z')" |
27 | 28 | |
28 | -[[$[Get Code]]][3] |
|
29 | +``` |
|
29 | 30 | |
30 | 31 | Update every minute in `crontab`: |
31 | 32 | |
32 | - * * * * * ~/bin/dwmstatus.sh |
|
33 | +```crontab |
|
34 | +* * * * * ~/bin/dwmstatus.sh |
|
35 | +``` |
|
33 | 36 | |
34 | 37 | |
35 | 38 | Test cron command: |
36 | 39 | |
40 | +``` |
|
37 | 41 | env -i bin/dwmstatus.sh |
38 | 42 | |
39 | -[[$[Get Code]]][4] |
|
43 | +``` |
|
40 | 44 | |
41 | 45 | Example status: ` 2014-05-29 11:52 BST ` |
42 | 46 | |
... | ... | @@ -50,6 +54,4 @@ Back to [WindowManagers][5] |
50 | 54 | |
51 | 55 | [1]: http://wongdev.com/blog/2013/01/24/dwm-tags-are-not-workspaces/ |
52 | 56 | [2]: http://dwm.suckless.org/patches/pertag |
53 | - [3]: Tech.DWM?action=sourceblock&num=1 |
|
54 | - [4]: Tech.DWM?action=sourceblock&num=2 |
|
55 | - [5]: Tech.WindowManagers |
|
... | ... | \ No newline at end of file |
0 | + [5]: Tech.WindowManagers |
Tech/GarminForetrex.md
... | ... | @@ -54,4 +54,4 @@ CE p0 p1 p2 p3 FCC |
54 | 54 | * [http://www.rigacci.org/wiki/doku.php/doc/appunti/hardware/garmin\_foretrex\_201][1] |
55 | 55 | * <http://www.gpsvisualizer.com/map_input?form=google> |
56 | 56 | |
57 | - [1]: http://www.rigacci.org/wiki/doku.php/doc/appunti/hardware/garmin_foretrex_201 |
|
... | ... | \ No newline at end of file |
0 | + [1]: http://www.rigacci.org/wiki/doku.php/doc/appunti/hardware/garmin_foretrex_201 |
Tech/MSVCProductivity.md
... | ... | @@ -5,11 +5,10 @@ |
5 | 5 | ## List of source files |
6 | 6 | |
7 | 7 | #!/bin/sh |
8 | +``` |
|
8 | 9 | xmlstarlet sel -t -c 'Project/ItemGroup/ClCompile' -i "contains(Include,'.cpp')" -o "ClCompile" -n libVinoDriverUnitTests.vcxproj |
9 | 10 | |
10 | -[[$[Get Code]]][1] |
|
11 | - |
|
12 | - |
|
11 | +``` |
|
13 | 12 | |
14 | 13 | # Preprocess-only |
15 | 14 | |
... | ... | @@ -93,9 +92,8 @@ xmlstarlet sel -t -c 'Project/ItemGroup/ClCompile' -i "contains(Include,'.cpp')" |
93 | 92 | |
94 | 93 | * Possibly [WholeProgramOptimization][4][?][4], [ExcludeBuckets][5][?][5] or [EnableFunctionLevelLinking][6][?][6] have something to do with the fix. |
95 | 94 | |
96 | - [1]: Tech.MSVCProductivity?action=sourceblock&num=1 |
|
97 | 95 | [2]: http://github.com/cognomen/C-MsgGen |
98 | 96 | [3]: Tech.VCProj?action=edit |
99 | 97 | [4]: Tech.WholeProgramOptimization?action=edit |
100 | 98 | [5]: Tech.ExcludeBuckets?action=edit |
101 | - [6]: Tech.EnableFunctionLevelLinking?action=edit |
|
... | ... | \ No newline at end of file |
0 | + [6]: Tech.EnableFunctionLevelLinking?action=edit |
Tech/MigrateVSStoSVN.md
... | ... | @@ -20,4 +20,4 @@ |
20 | 20 | * Run [Code.SvnImportSnapshots][2] to import to SVN |
21 | 21 | |
22 | 22 | [1]: Tech.SourceSafeCommands |
23 | - [2]: Code.SvnImportSnapshots |
|
... | ... | \ No newline at end of file |
0 | + [2]: Code.SvnImportSnapshots |
Tech/SourceSafeCommands.md
... | ... | @@ -46,6 +46,7 @@ Formatted for Cygwin bash. |
46 | 46 | |
47 | 47 | # Example Script |
48 | 48 | |
49 | +``` |
|
49 | 50 | #!/bin/sh |
50 | 51 | # Get project from VSS |
51 | 52 | # |
... | ... | @@ -71,6 +72,4 @@ else |
71 | 72 | "$SS" Get "$VSS_PROJ" "-Vl$LABEL" "-Y$USER", -R -I- |
72 | 73 | fi |
73 | 74 | |
74 | -[[$[Get Code]]][1] |
|
75 | - |
|
76 | - [1]: Tech.SourceSafeCommands?action=sourceblock&num=1 |
|
... | ... | \ No newline at end of file |
0 | +``` |
Tech/UbuntuProductivity.md
... | ... | @@ -95,23 +95,21 @@ Switching from `csh` to `bash`. Must be done for interactive shells only otherwi |
95 | 95 | |
96 | 96 | `.cshrc` |
97 | 97 | |
98 | +```csh |
|
98 | 99 | # Exec bash only if using an interactive shell. |
99 | 100 | if ($?prompt) then |
100 | 101 | setenv SHELL /bin/bash |
101 | 102 | exec $SHELL |
102 | 103 | endif |
103 | 104 | |
104 | -[[$[Get Code]]][11] |
|
105 | - |
|
106 | - |
|
105 | +``` |
|
107 | 106 | |
108 | 107 | # 8. Disable overlay toolbars |
109 | 108 | |
109 | +``` |
|
110 | 110 | gsettings set com.canonical.desktop.interface scrollbar-mode normal |
111 | 111 | |
112 | -[[$[Get Code]]][12] |
|
113 | - |
|
114 | - |
|
112 | +``` |
|
115 | 113 | |
116 | 114 | # 9. Resources |
117 | 115 | |
... | ... | @@ -127,6 +125,4 @@ gsettings set com.canonical.desktop.interface scrollbar-mode normal |
127 | 125 | [8]: #toc7 |
128 | 126 | [9]: #toc8 |
129 | 127 | [10]: #toc9 |
130 | - [11]: Tech.UbuntuProductivity?action=sourceblock&num=1 |
|
131 | - [12]: Tech.UbuntuProductivity?action=sourceblock&num=2 |
|
132 | - [13]: http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome |
|
... | ... | \ No newline at end of file |
0 | + [13]: http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome |