Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@livibetter
Last active December 25, 2015 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save livibetter/7024330 to your computer and use it in GitHub Desktop.
Save livibetter/7024330 to your computer and use it in GitHub Desktop.
bits.2013

bits.2013

This is a Gist for stuffing my quick notes and thoughts in here, also serving as development tracker for bits.

Moved

Now bits has moved to WordPress.

Development of bits

Key points:

  • README.md isn't very important since it isn't a note, but it may be used for some indexing or linking to other years.

  • Each note is a comment, currently group year's notes in one Gist. No need to title each note, too much effort for reference when comment link is enough.

    Originally, I thought of using pattern like YYYYnnn, year with 3-digit number. But it's really not necessary. Not even me would actually refer to the notes.

  • Must have proper formatting capability, like Markdown.

    Although these are just notes, but I would prefer formatting them well. Not tweets, nor blog posts.

  • Must be able to scroll down a single page to view multiple rendered notes.

    I wished to have each note their own page, but couldn't really find any easy solution to meet my needs, so settling down in Gist comments works best for now.

  • Okay to lose these notes, they may not be worth reading again.

  • Okay not to have proper search function since each note is a comment.

  • Okay not to have separate comment thread for each note.

  • Okay not to have commit history for notes.

Ideas:

  • The first note is a bit long due to the emerge log, it might be a good idea to have another Gist to store those log stuff, like bits.2013.bits.

  • keyword' bookmark for comment form

    Unfortunately, the form doesn't have ID.

@livibetter
Copy link
Author

Don't know who mess up: Blogger or Disqus?

screenshot

The comments were synced back into wrong post.

Well, maybe it's time to stop the comment syncing and remove comment count.

@livibetter
Copy link
Author

In Anthony Bourdain's Parts Unknown Detroit episode, it brought up the issue in fire department, one is underfunded and they have to pay for their own meals. So I searched "fire station garden," it seems a few have established own garden for whatever reasons.

@livibetter
Copy link
Author

Subscribe to GitHub's Explore Email comes too late and too little, my gh-trend.py is better. No repeat, FTW!

@livibetter
Copy link
Author

Thinking about using YouTube API v3 to perform a random video search. Since there is no built-in option for random, I thought I could use that publishAfter and publishBefore by combining with a special made pdf like by month. Starting from February, 2005, when YouTube was found.

But when I entered 2005-02-01T00:00:00Z into publishBefore, there are about 90K results. As I looked into the date, I realized that's not the published date as video uploaded date. It seems to be Recording date which uploader can enter any date they want.

Honestly, I don't know who made that decision when on video pages you can read "Published on M, d YYYY." That's really a "published" != "published."

And I am calling that decision is terrible, why? Because they you entered UNIX epoch 1970-01-01T00:00:00Z you would get total results of 1,000,000. The cap value when there was a lot of video hits.

See? You can't use pagination, that next page token is just, well, awful design to say the least. It comes with its partner in crime, "infinite scroll." When infinite scroll showed up on Internet, accuracy and precision were thrown into fire. Next, next, and next.

How many times do I have to remind my self: stay away of APIs?

@livibetter
Copy link
Author

Food Wishes' latest video, Thanksgiving Turkey Inspired by Peruvian-Style Rotisserie Chicken, somehow gave me some (imaginary) double entendres. It all started with this line:

"once you and the turkey are completely covered in the mixer."

It was still normal, but then

  • tie those legs together
  • put half ot that in the cavity
  • roughly the same size of your breast
  • thickest part of thighs

If you pretend hear ingredients as something else, cookery video could be nasty (or juicy?).

@livibetter
Copy link
Author

Was reading /usr/bin/xzgrep, then I saw a left parentheses in the beginning of a pattern:

  case $option in
  (-[0123456789abcdhHiIKLlnoqrRsTuUvVwxyzZ]?*)

Didn't know that and never had seen any do that. I know it must be a correct syntax since it's a common script on systems. So I looked it up:

case_item_ns     :     pattern ')'               linebreak
                 |     pattern ')' compound_list linebreak
                 | '(' pattern ')'               linebreak
                 | '(' pattern ')' compound_list linebreak

help case in Bash prompt doesn't include such, but manpage does:

case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac

@livibetter
Copy link
Author

Joining strings/arrays in jq:

jq '[["BEGIN"], [.[].key + "SEP"][:-1], [.[].key][-1:], ["END"]] | add | add'

This is so far I figured out how to do it.


2013-11-18T06:16:15Z: used in lu.sh

@livibetter
Copy link
Author

Via Paul Hollywood's Pies and Puds, I saw a mushroom product, mushroom in a box, the maker mixes mushroom spore (or mycelium) and coffee grounds, sealed in plastic bag and stored in dark room to let them grow. It seems quite easy as long as you have spore.

I searched for growing from store-bought mushroom and it looks quite promising to grow you own. Just need to identify and make sure no contamination.

@livibetter
Copy link
Author

I always feel a bit of unease when I see an animal ear tag, but there is actually a collar tag method, saw it on Nigel and Adam's Farm Kitchen first episode.

@livibetter
Copy link
Author

My compost + worm is not doing well. The top half of compost was really dry, hot day yesterday. I saw white worms (probably too acidic) and the worst was there were a few of small cockroaches. I guess open door policy isn't a good idea, my compost bin is made of big plastic bag. Really need to have a real bin, so I could close the lid with extra hole for air flow. Using some small mesh type should stop cockroaches inviting themselves in.

But there was a good news, a rotten shallot sprouted, I took a photo and put it back on top of pile. I have no intention to grow shallot in pile, but didn't want to kill it, either. Good luck to it.

Now, I will spread out to single layer to dry out, hopefully there is no roach egg, Slowly move into a bin. Gotta pray!


2013-11-24T08:57:58Z: baking soda seems like one stones kill two birds, raise the pH and repel insect (mixed equal part with sugar).

@livibetter
Copy link
Author

Cheap and Easy Worm Bin!

  • "An earthworm can consume about 1/2 of its weight each day."
  • "There are roughly 500 worms in one pound."

How Fast Do Composting Worms Multiply?

Sparse populations of worms may be slow to reproduce, but as a general rule, a worm at least 60 days old can find a mate and produce a cocoon that contains an average of four babies. Typically, a population of composting worms doubles every three to six months. Under ideal conditions as few as eight worms can become 1,500 worms in only six months, according to the Texas A&M University AgriLife Extension.

Everything You Need to Know About Composting With Worms

  • "Worms eat a little over their weight in food every day."
  • "According to Mary Appelhof, author of Worms Eat My Garbage, 8 of these worms can reproduce into 1500 or 1.5 pounds in as little as 6 months."

@livibetter
Copy link
Author

Bi-monthly Windows Update just hit another giant rock. The svchost.exe 100% CPU utilization, had to search and find an answer on my own, also must manually download and install the so called "Cumulative Security Update for Internet Explorer 8 for Windows XP (KB2879017)"

If one didn't know to look at Task Manager and spot that 100%, and didn't think about searching, no wonder you need Windows Experts / Professionals / Certified <title>, so you could ask and get an answer, and pray that did fix your particular issue.

One hour of my life could never get back.


2013-11-26T03:05:08Z: speaking too soon, or thought that update fixed the issue when I saw the green progress bar running, 22 minutes later, it's still running. svchost.exe is still using 100% of a core. FTW! (= Fuck the Windows!)

@livibetter
Copy link
Author

Why do Mozilla (and Google and many other companies) always think people have to know how to code?

The goal for "loosen the gatekeeper's grip" that I could agree, but really people who can code and have talent, already know how to proceed. We have too much bad code + websites around already, no need to add more.

They should instead think about how to lower the requirement of using the web. That's computer and its processing power. Think about how fat Mozilla's browser is. Think about how not to ask user to upgrade or buy a new computer in order to smoothly run their several generations before the current browser.

Think about those, Mozilla.

PS. just a day or two before I posted Tired of these CSS CPU suckers, if they have to teach, teach people simplicity sometimes is better for knowledge and useful contents.

@livibetter
Copy link
Author

My new handcrafted worm bin box has air flow issue, sulfur or rotten egg smell. Now I put a fan on top of the opening, fan in some fresh air. Now I know why those worm bin has drainage holes, not just for water, but also the air.

@livibetter
Copy link
Author

A place called Dildo in Newfoundland via Bizarre Food America Toronto episode.

I always tell myself not to laugh by one's name, but I wonder how do these people fill in forms outside of far away from Dildo for their addresses, They probably have to explain every time.

@livibetter
Copy link
Author

Two type of mushroom both has mycelium growing, but only a small amount, another week, they could spread all over, hopefully. Then I could start the next phase.

While I was opening a tea bag and poured the tea leaves out, I thought maybe I could just grow mushroom inside the tea bag, after microwave used tea bag, wait for cool down, then slice a couple of pieces of mushroom and stuff in?

But that would have to wait to see if I could grow mushroom in tea leaves first.

@livibetter
Copy link
Author

While I was searching for suitable materials for worm bin box, I thought a traveling fabric-style bag would be perfect, rectangular, good-sized, could be breathable, drain-able, and bug-free. And you could just zip it up once you dump the kitchen scraps.

Just put a bigger plastic something underneath plus some rocks to lift the bag up for the excessive water. Portable!

Unfortunately, I don't have one and I don't think backpack is a good idea since, they usually could be opened to half way of their heights.

@livibetter
Copy link
Author

First 25 problems solved!

Congratulations, the answer you gave to problem 18 is correct.

You are the 65047th person to have solved this problem.

Nice work, livibetter, you've just advanced to Level 1.
56178 members (16.3%) have made it this far.

You have earned 1 new award:

  • The Journey Begins: Progress to Level 1 by solving twenty-five problems

@livibetter
Copy link
Author

After updated glibc and rebooted, libreoffice-bin gives:

$ libreoffice 
/usr/lib64/libreoffice/program/soffice.bin: symbol lookup error: /usr/lib64/libreoffice/program/libmergedlo.so: undefined symbol: hb_icu_get_unicode_funcs

I am guessing it's something between glibc 2.15 and 2.16.


2013-12-05T09:44:47Z: turned out to be harfbuzz 0.9.12 -> 0.9.23, saw it as same 23=23, bug report. Asked on IRC to find out I read the version numbers wrong.

2013-12-06T02:29:27Z: it looks like I actually hit a Portage bug, now the summary is changed to: sys-apps/portage: emerge breaks non-world installed packages with updates. By the way, that bug report is my first one for Gentoo, IIRC.

@livibetter
Copy link
Author

Just learned Clara from Great Depression Cooking passed away, I had been wondering why the videos suddenly stopped, last few months a couple was posted, now I understand.

Sadly, she is gone before her 100th.

@livibetter
Copy link
Author

CSS position: sticky looks interesting, but Firefox don't have that in 24 ESR, until 26. Chrome 32:stable doesn't have it, either. might be removed from WebKit or something. Probably not mature enough.

@livibetter
Copy link
Author

It looks like my handcrafted worm bin is a failure, I am going to super-downsize the box before I murder more worms.

@livibetter
Copy link
Author

Pitbull feat. Ke$ha - Timber via ASUS ROG while waiting the resume of Game 2 of Elfi and Jaedong, they are under DDoS attack.

@livibetter
Copy link
Author

nspr is holding autoconf-2.13:

$ eix -I1c autoconf
[I] sys-devel/autoconf (2.13(2.1)@10/18/2009 2.69(2.5)@08/10/2013): Used to create autoconfiguration files

$ equery d =sys-devel/autoconf-2.13
 * These packages depend on sys-devel/autoconf-2.13:
app-editors/vim-7.3.762 (sys-devel/autoconf)
app-editors/vim-core-7.3.762 (sys-devel/autoconf)
dev-libs/nspr-4.10.2 (=sys-devel/autoconf-2.1*)
net-misc/openssh-5.9_p1-r4 (sys-devel/autoconf)
sys-apps/attr-2.4.46-r2 (sys-devel/autoconf)

$ eix -I nspr
[I] dev-libs/nspr
     Available versions:  4.10 ~4.10.1 4.10.2 {debug}
     Installed versions:  4.10.2(10:45:15 PM 12/02/2013)(-debug)
     Homepage:            http://www.mozilla.org/projects/nspr/
     Description:         Netscape Portable Runtime

@livibetter
Copy link
Author

Trying to make Bokashi composting starter, read about using rice to ferment and use newspaper to soak up the mixture once fermented.

I just put equal part by volume of rice, demerara sugar, potato starch, and flour, with probably three or four times of water. Covered with napkin and placed on a DC adapter, just like making sourdough starter, only I put more stuff. Probably not ideal, just playing around, I might end up with a smelly jar or disgusting mixture.

Whatever the result would be, I would pour the entire jar into my failed compost pile. Just like that, more smelly perhaps?


2013-12-09T12:30:20Z: the box is brewing, bubbles coming up from bottom especially after slight shaking.

@livibetter
Copy link
Author

Since the new python-exec package, I symlink'd for pip for Python 3.3:

/home/livibetter/.local/bin/pip-python3.3 -> /usr/lib/python-exec/python3.3/pip

There is another way:

EPYTHON=python3.3 pip

@livibetter
Copy link
Author

test post

Oh yeah, it's back.

@livibetter
Copy link
Author

My mushroom bed is having green mold, thinking about applying salt (or salted water) or just digging the infected area.

@livibetter
Copy link
Author

There was an error occurred when I tried to add comment #67, Gist threw the following error:

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

I emailed GitHub Support, then the error was gone. During the downtime, I searched for alternative options. Tumblr supports Markdown but it doesn't have comment system. Then I saw WordPress supports Markdown on both posts and comments. Needless to say, I was tempted and now bits is on WordPress.

The End

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment