Skip to content

Instantly share code, notes, and snippets.

View bitwombat's full-sized avatar

Bit Wombat bitwombat

View GitHub Profile
/** Woo 3.3 removed the ability to crop the shop_single image in the settings.
* So we set its size here.
*
* If we don't put this as a high priority in the init hook, the calls in
* Woo happen before these filters are defined, removing ability to affect it.
*
* Init separately here to avoid unintended consequences of doing all hook setting at
a high priority.
*/
@bitwombat
bitwombat / verify
Created May 30, 2019 02:59
Package verification script
#!/bin/bash
# Use debsums to check for any altered binaries
#
# To recreate the baseline file, simply rm it
cd /root/verify || exit
VERIFY="debsums | grep FAILED"
TERMINAL=
@bitwombat
bitwombat / verify
Created May 30, 2019 03:06
Package verification script
#!/bin/bash
# Use debsums to check for any altered binaries
#
# To recreate the baseline file, simply rm it
cd /root/verify || exit
TERMINAL=
@bitwombat
bitwombat / log
Created May 30, 2019 13:55
ctags log
Messages maintainer: Mike Williams <mrw@eandem.co.uk>
"functions.php" 211L, 8145C
gutentags: Scanning buffer 'functions.php' for gutentags setup...
gutentags: No specific project type.
gutentags: Setting gutentags for buffer 'functions.php'
gutentags: Generating missing tags file: /data/www/kathys_new/tags
gutentags: Wildignore options file is up to date.
gutentags: Running: ['/home/gbell2/.vim/bundle/vim-gutentags/plat/unix/update_tags.sh', '-e', 'ctags', '-t', 'tags', '-p', '.', '-o', '/home/gbell2/.vim/bundle/vim-gutentags/res/ctags_recursive.options', '-x', 'node_modules', '-x', 'vendor', '-l', 'tags.log']
gutentags: In: /data/www/kathys_new
gutentags: [job output]: 'Locking tags file...'
@bitwombat
bitwombat / Page_294.hs
Created July 2, 2019 13:06
Exercise from page 294 of Haskell Book - Numbers into words
module Page294 where
--Numbers into words
import Data.List (intersperse)
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
@bitwombat
bitwombat / Page_294.hs
Created July 2, 2019 13:53
Exercise from page 294 of Haskell Book - Numbers into words
module Page294 where
--Numbers into words
import Data.List (intersperse)
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
@bitwombat
bitwombat / Page_294.hs
Created July 2, 2019 13:54
Exercise from page 294 of Haskell Book - Numbers into words
module Page294 where
--Numbers into words
import Data.List (intersperse)
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
@bitwombat
bitwombat / Page367.hs
Created July 8, 2019 09:20
Page 367 of HFFP
module Page367 where
import Data.Time
data DatabaseItem = DbString String
| DbNumber Integer
| DbDate UTCTime
deriving (Eq, Ord, Show)
theDatabase :: [DatabaseItem]
@bitwombat
bitwombat / Page440.hs
Created July 14, 2019 23:01
mapTree exercise, page 440.
module Page440 where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
mapTree :: (a -> b)
-> BinaryTree a
-> BinaryTree b
@bitwombat
bitwombat / Page440.hs
Created July 15, 2019 07:32
Page440 solution to exercise in HPFFP
module Page440 where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
mapTree :: (a -> b)
-> BinaryTree a
-> BinaryTree b