All posts by cdstealer

Tofu Quiche

Prep time: 30 minutes
Cook time: 40 minutes

Makes 4 individual flans

Ingredients

Pastry

  • 8 oz (240g) plain flour
  • pinch of salt
  • 4 oz (120g) vegan margarine
  • 2-3 tablespoons cold water
  • 1/2 Tsp Turmeric

Preparation method (pastry)

  1. Place the dry ingredients into the processor.
  2. Add the margarine when the processor is on a low speed, in small pieces.
  3. Keep the processor on medium and add the water. Increase the processor gradually until all the ingredients combine.
  4. Stop when the pastry forms a ball.
  5. Knead lightly to form a ball. Cover in clingfilm and refrigerated until needed.

Filling

  • 12.3 oz/390g extra firm silken tofu, patted dry
  • 2 Tbsp nutritional yeast
  • 3 Tbsp hummus
  • Sea salt and black pepper (to taste)
  • 250g Halved Chestnut mushrooms
  • 1 Sweet pointed pepper
  • 60g chopped broccoli

Instructions

  1. Preheat oven to 180C(fan).
  2. Prep veggies and add to a baking sheet. Toss with 2 Tbsp olive oil and a healthy pinch each salt and pepper and toss to coat. Place in the oven for approx. 10 mins.
  3. Line the flan tin with the pastry
  4. blind bake for ~10 minutes.
  5. Remove the tin foil and baking beans, then bake for a further 5 mins.
  6. To prepare tofu filling, add drained tofu to a food processor with nutritional yeast, hummus.
  7. Place the veggies in mixing bowl and top with the tofu mixture. Toss to coat.
  8. Spoon in the filling.
  9. Bake quiche at 180C degrees for a total of 40-45 minutes or until then top appears golden brown and firm. If the crust begins to get too brown, loosely tent the edges with foil.

Useful Splunk Tips

Disable the "open in search" function in a dashboard.

<option name="link.visible">false</option>

One shot log ingestion: (super useful!)

$SPLUNK_HOME/bin/splunk add oneshot "/path/to/file" -index <index> -sourcetype <sourcetype> -auth admin:changeme

Remove indexed logs

splunk cmd btprobe -d $SPLUNK_DB/fishbucket/splunk_private_db --file --reset

track files being read

https://<server>:8089/services/admin/inputstatus/TailingProcessor%3AFileStatus

Vegan Pumpkin Cinnamon Rolls

THIS IS A WORK IN PROGRESS AND STILL BEING TWEAKED!

Ingredients

Dough

4½ tsp yeast
5 cups (approx 680g) plain flour
1 tsp salt
2 tsp cinnamon
¼ tsp ginger
¼ tsp ground cloves
¼ tsp nutmeg
2 tbsp agave nectar
150ml warmed milk of choice (I used organic soya milk)
1 tbsp grapeseed oil (I used coconut oil)
1 tsp of No Egg
1 can (340g) pumpkin puree

Filling

½ cup agave nectar
1 tbsp cinnamon
½ tbsp vegetable shortening, (I use spectrum butter flavor)
¼ cup each of raisins and pecans, optional

Directions

In mixer bowl, mix pumpkin purée, oil, milk and flaxseed meal together.

In a separate bowl, mix together the dry ingredients.

Pour the dry ingredients into the mixer bowl a little bit at a time and incorporate with the wet ingredients. Turn the dough out onto the counter coated with some of the remaining flour. Knead the remaining flour into the dough until it is used up and you have a smooth, elastic dough.

Put the dough into a bowl coated with cooking spray and lightly spray the top of the dough. Cover with plastic wrap and set in a warm place to rise. Let it rise until doubled, about 1 hour.

Combine the honey, cinnamon, shortening, chopped pecans and raisins (if using) in a small bowl, set aside. Transfer the risen dough to a work surface, and pat or roll it into a 16″ x 12″ rectangle. Spread the mix over the dough.

Roll the dough into a log the long way. Cut the roll into even slices (I got 12 rolls). Place slices in a greased 8 inch square baking pan sprayed with cooking spray. Cover and let rise until almost doubled, about 45 minutes. Bake at 350F (180C) for 30-40 minutes until they turn golden brown across the centre.

Remove from oven and let cool about 15 minutes. Drizzle with your favorite frosting or eat plain. YUM!

 

Mushroom Shroganoff.

Ingredients

1 tbsp coconut oil
1 onion, diced
1 clove garlic, crushed
a yellow pepper, diced
400g mushrooms, sliced (*I used 1/2 white & 1/2 Chestnut)
1 tsp dried coriander
1 tsp mixed spice
400ml tin of coconut milk (*I drained the fluid and used approx. 300ml of solid)

Notes

This is lovely with a mix of white and brown mushrooms too. Serve with boiled rice, salad tossed in vinaigrette and garlic bread (made with vegan marg or olive oil). Yum!

Method

Gently fry the onion, garlic and yellow pepper in the olive oil for a couple of mins until starting to soften.

Add the mushrooms, turn the heat up and cook until starting to brown.

Add the rest of the ingredients, stir well, season to taste and reduce the heat so that it bubbles gently for 15 to 30 mins, stirring occasionally. (The sauce should reduce and thicken to a lovely creamy consistency.)

That's it!

Splunk Dropdown Menu

You can create drop down menus in most apps eg search or a custom one.  This can be achieved creating the following path:

/opt/splunk/etc/apps/<app_name>/local/data/ui/nav

Then created the file default.xml.  An example of the content is:

<nav search_view="search" color="#002B48">
 <view name="search" default='true' />
 <collection label="Dashboards">
 <collection label="Business Intelligence">
 <view name="betting_stats" />
 </collection>
 <collection label="Native Mobile Intelligence">
 <view name="crittercism_overview" />
 <view name="crittercism_trends" />
 </collection>
 <collection label="Operational Intelligence">
 <view name="operational_intelligence" />
 </collection>
 <collection label="Social Media Posture">
 <view name="social_media_posture" />
 </collection>
 </collection>
</nav>

The second line is the view that is loaded.  This can be a dashboard or as above, I've just used the default search view.  Below that are each option in the menu separated by the "<collection>" tags.
Each view name is the name of the dashboard to open.

Example

Useful Splunk searches.

List all agents and versions :)

index=_internal source=*metrics.log group=tcpin_connections | eval sourceHost=if(isnull(hostname), sourceHost,hostname) | dedup sourceHost | where sourceIp != sourceHost | table sourceHost sourceIp os version | sort 0 version

List all sourcetypes and event dates

| metadata type=sourcetypes index=* | convert ctime(firstTime) ctime(lastTime) | table firstTime lastTime sourcetype | sort +firstTime

List sources and size

index="_internal" source="*metrics.log" group="per_source_thruput"| eval GB=kb/1024/1024 | chart sum(GB) by series | sort - sum(GB)

List License days remaining

| rest /services/licenser/licenses | search group_id="enterprise" status="valid" OR status="expired" | rename group_id as Type | rename splunk_server as "Splunk Server" | eval "Quota (GB)"=(quota/1024/1024/1024) | eval now=now() | eval "Days Remaining"=(expiration_time-now)/86400 | eval "Expiration Time"=strftime(expiration_time, "%Y-%m-%d  %H:%M:%S") | eval "Days Remaining"=round('Days Remaining', 0) | table "Type" "Quota (GB)" "Expiration Time" "Days Remaining" "Splunk Server" status | where 'Days Remaining' < 10

List index size per day

index=_internal source="*license_usage.log"
| eval indexname = if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx)
| eval sourcetypename = st
| bin _time span=1d
| stats values(poolsz) as poolsz sum(b) as b by _time, pool, indexname, sourcetypename
| eval GB=(b/1024/1024/1024)
| eval pool=(poolsz/1024/1024/1024)
| fields _time, indexname, sourcetypename, GB, pool
| search indexname=* sourcetypename=*
| stats sum(GB) as GB by _time indexname
| eval GB = round(GB,4)

List index size per indexer

| rest /services/data/indexes
| where disabled = 0
| search title= "wh_aws"
| eval currentDBSizeGB = round( currentDBSizeMB / 1024)
| where currentDBSizeGB > 0
| eval maxTotalDataSizeMB = round( maxTotalDataSizeMB / 1024)
| eval frozenTimePeriodInSecs= round( frozenTimePeriodInSecs / 60 /60/ 24)
| eval first_event=strptime(minTime,"%Y-%m-%dT%H:%M")
| eval last_event=strptime(maxTime,"%Y-%m-%dT%H:%M")
| eval TimeDiff=last_event-first_event | eval TimeDiff = round(TimeDiff/60/60/24,2)
| table splunk_server title summaryHomePath_expanded minTime maxTime currentDBSizeGB totalEventCount frozenTimePeriodInSecs maxTotalDataSizeMB TimeDiff
| eval diff=(latest-earliest)
| rename minTime AS earliest maxTime AS latest summaryHomePath_expanded AS index_path currentDBSizeGB AS Size(GB) totalEventCount AS Count frozenTimePeriodInSecs AS Days maxTotalDataSizeMB AS "Max(GB)" title AS index TimeDiff as "Duration"

List users

|rest /services/authentication/users splunk_server=local |fields title type realname email roles | nomv roles| rename title as Username type as Authentication realname as "Full Name" email as Email roles as Roles

List sourcetypes where data is older than X

| tstats latest(_time) as latest where index=* by sourcetype host index | where latest < relative_time(now(), "-4h") | convert ctime(latest)

List indexes on remote search head

| rest /services/data/indexes | search NOT (title="_*" OR title="history" OR title="summary" OR title="example" OR title="main" OR title="splunklogger") | dedup title | table title currentDBSizeMB maxTotalDataSizeMB totalEventCount minTime maxTime

# Find top hosts

| tstats count by host | eventstats sum(count) as total | eval percentage = round(count/total*100,0) | fields - total | sort - count | head 40

Bakewell Tart

Ingredients: (26cm x 19cm tray)

For the Pastry

(if you don't want pastry sides, reduce by 1/3)
300g plain flour
pinch of salt
150g vegan margarine (pure Soya)
3 tablespoons cold water

For the Sponge

170g of self-raising flour
170g of ground almonds
170g of caster sugar (or coconut sugar)
Half a teaspoon of baking powder
One teaspoon of almond extract
150ml of Coconut oil
170ml of water

Also, strawberry or cherry jam, icing sugar and flaked almonds to decorate.

Note:  If using coconut sugar, the sponge will be dark brown.

Method

  1. Preheat the oven to 190 degrees Celsius.
    Rub the margarine into the flour until it looks like fine breadcrumbs, then add a little cold water until it comes together as a dough, or use a food processor.
    Roll out to about a 3mm thickness, then line a tart tin with it.
    Prick with a fork to stop air bubbles from forming, line with foil and add baking beans, then blind bake for 10 minutes.
  2. Spread a generous layer of jam over the pastry.
  3. Mix the dry ingredients for the sponge together, then add the wet ingredients to it; it should be quite runny. Pour it into the pastry case, sprinkle over the flaked almonds and bake for 10 minutes, then lower the temperature to 160 degrees Celsius and bake for a further 45-55 minutes.
  4. Leave to cool, then shake some icing sugar over the top!

IMG_20150321_150736

IMG_20150321_161217

Portage TMPFS

Portage TMPDIR on tmpfs

When emerging packages it is possible to build them in tmpfs (RAM) space instead of having build files pushed and pulled to Hard Disk Drive (HDD) or Solid State Drive (SSD) space. Building in tmpfs both speeds up emerge times and reduces HDD/SSD wearing. For system's containing SSDs, it is generally a good idea to have Portage compile using tmpfs (RAM) instead burning up precious SSD write cycles (especially on something like compiling software).

fstab Configuration

Mount Portage's TMPDIR to tmpfs by adding the following to the system's /etc/fstab config file:

FILE /etc/fstab tmpfs fstab example
tmpfs		/var/tmp/portage		tmpfs	uid=portage,gid=portage,mode=775,size=2048M,noatime	0 0

Adjust the size parameter /etc/fstab to the desired amount of RAM. Systems with large amounts of RAM can increase the number quite significantly.

After /etc/fstab has been modified, mount Portage's TMPDIR to RAM by running the mount command followed by the directory location outline in fstab:

root #mount /var/tmp/portage

Considering tmpfs' Size

The system's tmpfs space should be large enough to handle the largest packages to be compiled on the system. If the tmpfs space were to ever become completely full then the emerge will fail. Most packages do not need more than 1 GB of tmpfs space their compiles, but there are few very large packages. If you have a lot of RAM, setting Be careful to include enough tmpfs space when installing the following packages:

app-office/openoffice: 10GBs or so.

www-client/chromium: More than 2GBs.

sys-devel/gcc: More than 4 GiB.

Per-Package Choices at Compile Time

Portage can be configured to build large packages outside of the tmpfs space on a per-package basis.

Create a file to tell Portage where to place the temporary files directory:

FILE /etc/portage/env/notmpfs.conf
PORTAGE_TMPDIR="/var/tmp/notmpfs"

Create a separate temporary file directory outside of the tmpfs mount location:

mkdir /var/tmp/notmpfs && chown portage:portage /var/tmp/notmpfs && chmod 775 /var/tmp/notmpfs

Create a special Portage file called package.env in /etc/portage and list all the packages that are too large to be compiled using tmpfs:

FILE /etc/portage/package.env
app-office/libreoffice notmpfs.conf
mail-client/mozilla-thunderbird notmpfs.conf
www-client/chromium notmpfs.conf

Chocolate Cherry Porter Bread

Prep time: 
Cook time: 
Total time: 
Serves: 8-10

INGREDIENTS

For the Bread
  • 2 cups (350g) SR flour
  • ¾ cup (70g) sugar
  • ½ cup (50g) cocoa powder
  • 2 tsp. baking powder (if using plain flour)
  • ½ tsp. baking soda (if using plain flour)
  • ½ tsp. salt
  • 12Oz (350ml) Porter Beer (Sainsburys TTD)
  • ¼ cup (60g) Vegan Margarine, melted (Pure Soy)
  • 1 tsp. vanilla
  • 2 cups (250g) fresh cherries, pitted and coarsely chopped
For the Chocolate Glaze
  • ½ cup (100g) Vegan Chocolate
  • ½ tbsp. Vegan Margarine (Pure Soy)

INSTRUCTIONS

Make the Bread
  1. Preheat oven to 180C.
  2. Grease or spray a 2lb loaf tin (unless it's nonstck)
  3. Combine flour, sugar, cocoa, baking powder, baking soda and salt.
  4. Add porter, margarine and vanilla. Stir just until blended.
  5. Fold in cherries.
  6. Pour into loaf pan.
  7. Bake 1 hour, or until toothpick inserted into center comes out clean.
Make the Glaze
  1. Melt chocolate chips on stove top or by microwaving in 30 second increments.
  2. Add margarine and stir until melted and blended.
Finish
  1. Allow loaf to cool and then remove from pan.
  2. Drizzle with glaze.

IMG_20150207_181145

Verdict

Unfortunately this turned out very bland.  The texture was OK, just not much taste.  I'll tweak this until I get it right, then I'll update.