text:
---
date: 2016-03-04 17:42:44+00:00
redirect_from:
  - /censorship-and-online-christian-discussion/
title: Is comment moderation the same as censorship?
excerpt: "Josh and Rev N have challenged me to think more deeply comments and moderation.  Are websites a free speech zone?  Should rudeness be tolerated? There must be a way for us to show grace in online speech."
header:
  teaser: "/assets/images/category-biblical-orthodoxy.png"
  image: assets/images/rudeness-civility-christian-comment-moderation.jpg
  caption:
categories: biblical-orthodoxy
tags:
  - moderation
  - commenting
  - comments
  - rules
  - emotions
  - heresy
  - universal-objective-justification
  - UOJ
  - lutheran
  - hermeneutics
  - manners
  - censorship
  - free-speech
  - politics
---
{% include toc title="Contents" icon="book" %}

From time to time this site is drowned in angry messages.  If they are rude, crude, or abusive, they do not appear on the blog.  Josh and Rev N have challenged me to think about the limits of free speech on private blogs.  I'm not sure how wrong I've been in my actions, but am willing to change my stance going forward.  If you have anything to add to this discussion, your contributions will be most welcome.

- How can we be less like the world in our online speech?
- How can we be faithful to the Word of God, while being kind to one another?

# Five examples of people who have been moderated

People don't like it when their comments are truncated.  If you go to the trouble of writing a comment on a blog, you want people to read all of your words exactly as you expressed them.  Conflict occurs when what you've said goes contrary to the spoken or unspoken rules of the blog-owner.

One error I've made is to assume that others share my assumptions of what constitutes proper Christian behavior.  Another is my failure to state clearly when and how I will moderate comments.

## 1. Ducky

In a comment thread on another blog Ducky tried to discredit me by revealing my past history of [reading tarot cards](/memoirs/tarot-cards/). This had nothing to do with what was being discussed.  Ducky revealed it only to smear me and derail the conversation.

Ducky makes no pretense of being a Christian.  He has many valuable things to say, such as his [comment on *Photographs and memories*](/memoirs/photographs-and-memories/#comment5).  It really surprised me that he took such a cheap shot.

## 2. Dan Trabue

Dan Trabue presents himself as an innocent Christian lamb who only wants to spread peace and love.  Yet he's been banned from many Christian blogs for years behavior to the contrary.  When people catch on to his game, he zeroes in with invective and abuse.

On the [While it's yet day version of this website](/about-website/) there was a page with extensive documentation about Dan Trabue.  He objected that the page might interfere with his ability to get a new job.  Out of kindness to him, the page has been removed under the condition that he stops his aggressive behavior against orthodox Biblical Christians.  If he crosses my path again,  the page *About Dan Trabue* will go back up.

Some information about him is still availble online [here](https://1eternitymatters.wordpress.com/2011/05/03/false-teacher-profile/).

## 3. Rev. N

Rev. N is a retired Lutheran pastor who made many helpful comments.  Then one day he submitted a long entry of 190 words unrelated to the subject of the post.  The comment was harshly critical of the government.  And it brought in the topic of *geocentricity*.

The resulting email exchange became a character assassination attack on me.  This otherwise kind and respectful Christian man suddenly seemed unwilling to give me any benefit of the doubt because I had wrongly misunderstood his comment to be relating to *flat earth*.

I was wrong for misreading what he said, and have apologized to him.

## 4. Don Vega

Don Vega left a harsh and abusive comment which showed little evidence of Christian grace.  You can see a somewhat less aggressive tone in his comments at [Extra Nos](http://extranos.blogspot.com/2016/01/hitler-loses-univeral-objective.html).

When his comment did not appear on this blog, he proceeded to [slander me online](http://extranos.blogspot.com/2016/01/hitler-loses-univeral-objective.html?showComment=1457026856192#c8430463623354438463). He also continued to paper me with email messages after 3 separate requests for him not to contact me again.  I can't print the profanity he used.

Here's my [public response](http://extranos.blogspot.com/2016/01/hitler-loses-univeral-objective.html?showComment=1457028187014#c5839851054149582370):

Don (or Ron) Vega,

Since you have chosen to slander me publicly here, let me clarify that all comments on my blog are moderated. Your behavior is an example of why this is the case. Your comment above was never published on my blog, so it could not have been "kilcreased" as you put it.

Perhaps I am pompous, but I'm too aware of my own failings, limitations and difficulties to be either uber-pious or sanctimonous. You must be confusing me with others. But that is not my concern.

As I wrote to you privately:

Please do not contact me again. We have obviously different ideas about what constitutes Christian behavior and belief. Let's let it go at that.

Your comment here is just like the ones you made at Extra Nos. Just because Bobby hit his sister, doesn't mean that you are not wrong for the things you do.

Just go.

## 5. Josh

My respect for Josh has grown through our email interactions this week.   He makes the following charges against me:

  * I call him out for apostasy yet refuse to debate issues

  * If my theology is so strong, then I must argue my point with him

  * I believe that "all my readers can't think for themselves"

  * I censor posts

Here are my answers to Josh.  I am open to critique if I am missing essential points.  Josh seems to assume that blogs are free speech zones and that bloggers must allow discussion and debate.  I do not agree.

# Censorship and personal blogs

A blog is a personal journal  - Web-log = blog.  Censorship does not apply to personal journals.

I do believe that people can think for themselves.  But I'm not going to provide a platform for:

  * Hatred of the government

  * Wrath against me and other readers

  * Argument of the basic tenets of Biblical Christianity as found in the Creeds (Apostles, Nicene, Athanasian) and common to the Book of Concord and Westminster Confession of Faith.

Honest discussion requires a common language.  And respect.  And a passion for truth.

Some commenters only want to spar.  They want to argue for the sport of it.   If that's you, then there are other places you can find that.  The purpose of this blog is to provide my understanding of Biblical faith as a Confessional Lutheran.  I seek to grow in my knowledge of and obedience to Jesus Christ.   I am not interested in pointless acrimonious debate.

# Saving Faith

There is a Biblical Christian faith, and there are many imposters.  It's not possible to convince people to believe.  That's the job of the Holy Spirit as he works through the Word and the sacraments of baptism and communion.  Faith is a gift of God.  Christian discussion is only possible when saving faith is present.

# When fruitful discussion is not possible

A recent [Gallup poll](http://www.christianpost.com/news/survey-christians-make-up-95-percent-of-u-s-religious-population-65621/) found that 78% of Americans consider themselves Christian.  Few of those hundreds of millions of people whould agree that:

  * All 66 books of the Bible (the Canon), and only those 66 books are the living Word of God and authoritative for life, doctrine and practice.

  * Scripture is without error

  * Scripture interprets Scripture.

People who don't share these basics speak different languages.  They will never agree on who God is and what he expects.  They will never come to any conclusions.

They have nothing to discuss.

# An example of commenting rules

In an attempt to address the issues raised in this post, I present [Bill Muehlenberg's commenting rules](http://billmuehlenberg.com).

**Commenting Rules**

Readers are welcome to post comments on the material posted here, but some simple rules apply.  If you are happy to abide by these rules, then by all means, send in your comments. Happy writing!

  * No trolls allowed.

  * I reserve the right to edit or refuse comments.

  * This site is meant to express my point of view. If you are looking for a soapbox to promote your own views, create your own website or blog site.

  * Comments should be brief (preferably under 100 words), polite, constructive and informed.

  * Comments which are simply attacks on myself, or are done in bad taste, or use rude language, or are possibly defamatory will not be posted.

  * You must state your full name to have your comments posted.

  * I may reply to some of your comments but will not be able to respond to all.

# Censorship and online Christian discussion

To each of these men, and to you, I freely admit that I have made mistakes in the area of comment moderation.  I am willing to change my stance.  But I'm not willing to be distracted by people who reject the authority of the Word.

If you have anything to add to this discussion, your contributions will be most welcome.

How can we be less like the world in our online speech?
How can we be faithful to the Word of God, while being kind to one another?

Originally published at: Comfort for Christians


text:
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]

# p5-Loading-Icons
p5.js script that showcases different cyclical loading animations. Loading Icons are kept simple by the use of only black and white and primitive shapes, and manipulating them to create interesting loading animations.

[Click Here](https://septianrazi.github.io/Loading-Icons/) to see.

## About The Project

This p5.js script compiles a collection of cyclical loading animations. These animations are kept deliberately simple by using only primitive shapes of a monochrome color.

### Built With

* [p5](https://p5js.org/)
* [Visual Studio Code](https://code.visualstudio.com/)

## Getting Started
### Prerequisites

To run it locally, you will have to run the website on a live server so that the javascript components can run. I like to use VSCode and its associated extensions to accomplish this.

### Running via VSCode

1. Clone the repo
   ```sh
   git clone https://github.com/septianrazi/Loading-Icons.git
   ```
2. Download and Install VSCode [https://code.visualstudio.com/](https://code.visualstudio.com/)
3. In VSCode, install the Live Server Extention
4. Run project on live server (Ctrl+Shift+P to open the command palette, then find "Live Server")

Or, you can view an example by [clicking here](https://septianrazi.github.io/Loading-Icons/).

## Roadmap

See the [open issues](https://github.com/othneildrew/Best-README-Template/issues) for a list of proposed features (and known issues).

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

You can contribute in mainly two ways;

### Adding / Tweaking an Existing Loading Animation

To add a loading animation you will need to do the following things:

1. Fork the Project
2. Create a branch for your new loading animation (`git checkout -b feature/CoolLoadingAnimation`)
1. Write the function in the [loadingFunctions.js](/loadingFunctions.js) file
2. Insert the name of the function you just created into the loadingFunctions array in loadingFunctions.js
3.  Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

### Resolving an general program issue or adding a general feature

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Write the code for the feature
3.  Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contact

Septian Razi - [septianrazi.github.io](septianrazi.github.io) -<EMAIL_ADDRESS>
Project Link: [https://github.com/septianrazi/Loading-Icons](https://github.com/septianrazi/Loading-Icons)

## Acknowledgements
* [p5.js](https://p5js.org/)
* [OthNeilDrew's README Template](https://github.com/othneildrew/Best-README-Template)

[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/othneildrew
[product-screenshot]: images/screenshot.png

license: MIT

repository: septianrazi/Loading-Icons

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: septianrazi/Loading-Icons


text:
# pulled

 * [Cuban Pulled Pork Paninis](../../index/c/cuban-pulled-pork-paninis.json)
 * [Pressure Cooker Beer And Mustard Pulled Turkey](../../index/p/pressure-cooker-beer-and-mustard-pulled-turkey.json)
 * [Pulled Brisket Sliders](../../index/p/pulled-brisket-sliders-368731.json)
 * [Pulled Corned Beef](../../index/p/pulled-corned-beef-51225010.json)
 * [Pulled Flank Steak In Red Wine Sauce Ropa Vieja O Carne Ripiada](../../index/p/pulled-flank-steak-in-red-wine-sauce-ropa-vieja-o-carne-ripiada.json)
 * [Pulled Turkey Barbecue Seibels](../../index/p/pulled-turkey-barbecue-seibels-14178.json)
 * [Pulled Pork Sliders](../../index/p/pulled-pork-sliders.json)
 * [Pulled Pork](../../index/p/pulled-pork.json)
 * [Bbq Pulled Pork With Carolina Sauce](../../index/b/bbq-pulled-pork-with-carolina-sauce.json)
 * [Hawaiian Bbq Pulled Pork Sandwich With Grilled Pineapple Relish Recipe](../../index/h/hawaiian-bbq-pulled-pork-sandwich-with-grilled-pineapple-relish-recipe.json)
 * [Pulled Pork Barbecue Recipe](../../index/p/pulled-pork-barbecue-recipe.json)
 * [Pulled Pork Nachos](../../index/p/pulled-pork-nachos.json)
 * [Pulled Pork Sandwich Recipe](../../index/p/pulled-pork-sandwich-recipe.json)
 * [Pulled Pork Sandwich With Bbq Sauce And Coleslaw](../../index/p/pulled-pork-sandwich-with-bbq-sauce-and-coleslaw.json)
 * [Pulled Pork With Black Pepper Vinegar Recipe2](../../index/p/pulled-pork-with-black-pepper-vinegar-recipe2.json)
 * [Pulled Pork](../../index/p/pulled-pork.json)
 * [Slow Cooker Georgia Pulled Pork Barbeque Recipe](../../index/s/slow-cooker-georgia-pulled-pork-barbeque-recipe.json)
 * [Slow Cooker Pulled Pork Sandwiches Recipe](../../index/s/slow-cooker-pulled-pork-sandwiches-recipe.json)
 * [Slow Cooker Pulled Turkey Sandwiches Recipe](../../index/s/slow-cooker-pulled-turkey-sandwiches-recipe.json)
 * [Spicy Pop Pulled Pork Recipe](../../index/s/spicy-pop-pulled-pork-recipe.json)
 * [Tortilla Omelet Burrito With Pulled Chicken And Salsa Verde](../../index/t/tortilla-omelet-burrito-with-pulled-chicken-and-salsa-verde.json)
 * [3 Ingredient Pulled Pork Barbeque](../../index/3/3-ingredient-pulled-pork-barbeque.json)
 * [4 Ingredient Slow Cooker Pulled Pork](../../index/4/4-ingredient-slow-cooker-pulled-pork.json)
 * [4Th Of July Pulled Pork](../../index/4/4th-of-july-pulled-pork.json)
 * [Alabama Pulled Pig](../../index/a/alabama-pulled-pig.json)
 * [Anyone Can Make Bbq Pulled Pork](../../index/a/anyone-can-make-bbq-pulled-pork.json)
 * [Apes Pulled Pork](../../index/a/apes-pulled-pork.json)
 * [Apple Cider Pulled Pork With Carameli](../../index/a/apple-cider-pulled-pork-with-carameli.json)
 * [Awesome Pulled Pork Bbq](../../index/a/awesome-pulled-pork-bbq.json)
 * [Barbecued Pulled Pork With Sweet So](../../index/b/barbecued-pulled-pork-with-sweet-so.json)
 * [Bbq Pulled Pork Pizza](../../index/b/bbq-pulled-pork-pizza.json)
 * [Bbq Pulled Pork Sandwich](../../index/b/bbq-pulled-pork-sandwich.json)
 * [Bbq Pulled Tuna Sandwich](../../index/b/bbq-pulled-tuna-sandwich.json)
 * [Beer And Bourbon Pulled Pork Sandwich](../../index/b/beer-and-bourbon-pulled-pork-sandwich.json)
 * [Beer Pulled Pork](../../index/b/beer-pulled-pork.json)
 * [Big Rays Only Slow Cooker Pulled Po](../../index/b/big-rays-only-slow-cooker-pulled-po.json)
 * [Big Vs Slow Cooker Pulled Pork](../../index/b/big-vs-slow-cooker-pulled-pork.json)
 * [Bobs Pulled Pork On A Smoker](../../index/b/bobs-pulled-pork-on-a-smoker.json)
 * [Bourbon Mango Pulled Pork](../../index/b/bourbon-mango-pulled-pork.json)
 * [Campbells Slow Cooked Pulled Pork](../../index/c/campbells-slow-cooked-pulled-pork.json)
 * [Carolina Pulled Pork Slow Cooker Dip](../../index/c/carolina-pulled-pork-slow-cooker-dip.json)
 * [Chef Johns Pulled Pork Bbq](../../index/c/chef-johns-pulled-pork-bbq.json)
 * [Chili With Pulled Beef Pork For A C](../../index/c/chili-with-pulled-beef-pork-for-a-c.json)
 * [Chinese Hand Pulled Noodles](../../index/c/chinese-hand-pulled-noodles.json)
 * [Creamy Jalapeno And Pulled Pork Quesa](../../index/c/creamy-jalapeno-and-pulled-pork-quesa.json)
 * [Dales Pulled Pork](../../index/d/dales-pulled-pork.json)
 * [Easy Slow Cooker Pulled Pork](../../index/e/easy-slow-cooker-pulled-pork.json)
 * [Easy Two Ingredient Pulled Pork](../../index/e/easy-two-ingredient-pulled-pork.json)
 * [Eatons Easy Pulled Pork](../../index/e/eatons-easy-pulled-pork.json)
 * [Exquisite Pulled Pork](../../index/e/exquisite-pulled-pork.json)
 * [Faux Smoked Pulled Pork Carnitas](../../index/f/faux-smoked-pulled-pork-carnitas.json)
 * [Fayes Pulled Barbecue Pork](../../index/f/fayes-pulled-barbecue-pork.json)
 * [Greek Pulled Pork](../../index/g/greek-pulled-pork.json)
 * [Hard Cider Pulled Pork](../../index/h/hard-cider-pulled-pork.json)
 * [Jackfruit Pulled Pork](../../index/j/jackfruit-pulled-pork.json)
 * [Jamies Pulled Pork Chili](../../index/j/jamies-pulled-pork-chili.json)
 * [Juicy Pulled Pork](../../index/j/juicy-pulled-pork.json)
 * [Kay Kays Pulled Pork](../../index/k/kay-kays-pulled-pork.json)
 * [Loaded Pulled Pork Totchos](../../index/l/loaded-pulled-pork-totchos.json)
 * [Memphis Pulled Pork](../../index/m/memphis-pulled-pork.json)
 * [Missouri Miner Pulled Pork](../../index/m/missouri-miner-pulled-pork.json)
 * [Newcastle Bbq Pulled Pork](../../index/n/newcastle-bbq-pulled-pork.json)
 * [North Carolina Pulled Pork](../../index/n/north-carolina-pulled-pork.json)
 * [North Carolina Style Pulled Pork](../../index/n/north-carolina-style-pulled-pork.json)
 * [Orange Soy And Honey Pulled Pork](../../index/o/orange-soy-and-honey-pulled-pork.json)
 * [Paleo Mexican Pulled Pork](../../index/p/paleo-mexican-pulled-pork.json)
 * [Pork Chile Rojo Pulled Pork With Red](../../index/p/pork-chile-rojo-pulled-pork-with-red.json)
 * [Pressure Cooker Taco Pulled Pork](../../index/p/pressure-cooker-taco-pulled-pork.json)
 * [Pulled Bbq Chicken Sliders](../../index/p/pulled-bbq-chicken-sliders.json)
 * [Pulled Bbq Pork Poutine](../../index/p/pulled-bbq-pork-poutine.json)
 * [Pulled Chicken Pretzel Sliders](../../index/p/pulled-chicken-pretzel-sliders.json)
 * [Pulled Lamb Sizzlin Sliders](../../index/p/pulled-lamb-sizzlin-sliders.json)
 * [Pulled Pork Chili Verde](../../index/p/pulled-pork-chili-verde.json)
 * [Pulled Pork Chili](../../index/p/pulled-pork-chili.json)
 * [Pulled Pork Grilled Cheese](../../index/p/pulled-pork-grilled-cheese.json)
 * [Pulled Pork Hash](../../index/p/pulled-pork-hash.json)
 * [Pulled Pork Hatch Chile Stew](../../index/p/pulled-pork-hatch-chile-stew.json)
 * [Pulled Pork Meatloaf](../../index/p/pulled-pork-meatloaf.json)
 * [Pulled Pork Pesto Sandwich](../../index/p/pulled-pork-pesto-sandwich.json)
 * [Pulled Pork Pub Subs](../../index/p/pulled-pork-pub-subs.json)
 * [Pulled Pork Yall](../../index/p/pulled-pork-yall.json)
 * [Pumpkin Pulled Pork Chili](../../index/p/pumpkin-pulled-pork-chili.json)
 * [Risotto With Pigeon Peas And Pulled P](../../index/r/risotto-with-pigeon-peas-and-pulled-p.json)
 * [Sams Favorite Pulled Pork](../../index/s/sams-favorite-pulled-pork.json)
 * [Sarges Ez Pulled Pork Bbq](../../index/s/sarges-ez-pulled-pork-bbq.json)
 * [Simple And Yummy Pulled Pork](../../index/s/simple-and-yummy-pulled-pork.json)
 * [Simple Slow Cooker Pulled Pork](../../index/s/simple-slow-cooker-pulled-pork.json)
 * [Sister Schuberts Barbecue Pulled](../../index/s/sister-schuberts-barbecue-pulled.json)
 * [Slow Cooked Barbeque Pulled Pork](../../index/s/slow-cooked-barbeque-pulled-pork.json)
 * [Slow Cooked Pulled Pork Shoulder](../../index/s/slow-cooked-pulled-pork-shoulder.json)
 * [Slow Cooker Alabama Pulled Bbq Chicke](../../index/s/slow-cooker-alabama-pulled-bbq-chicke.json)
 * [Slow Cooker Bbq Pulled Pork Sandwiche](../../index/s/slow-cooker-bbq-pulled-pork-sandwiche.json)
 * [Slow Cooker Beer Pulled Pork](../../index/s/slow-cooker-beer-pulled-pork.json)
 * [Slow Cooker Pulled Chicken Tacos](../../index/s/slow-cooker-pulled-chicken-tacos.json)
 * [Slow Cooker Pulled Pork Barbeque](../../index/s/slow-cooker-pulled-pork-barbeque.json)
 * [Slow Cooker Pulled Pork From Red Gold](../../index/s/slow-cooker-pulled-pork-from-red-gold.json)
 * [Slow Cooker Pulled Pork Roast](../../index/s/slow-cooker-pulled-pork-roast.json)
 * [Slow Cooker Pulled Pork With Orange J](../../index/s/slow-cooker-pulled-pork-with-orange-j.json)
 * [Slow Cooker Pulled Pork](../../index/s/slow-cooker-pulled-pork.json)
 * [Slow Cooker Root Beer Pulled Pork](../../index/s/slow-cooker-root-beer-pulled-pork.json)
 * [Slow Cooker Texas Pulled Pork](../../index/s/slow-cooker-texas-pulled-pork.json)
 * [Southern Barbeque Pulled Beef Sandwic](../../index/s/southern-barbeque-pulled-beef-sandwic.json)
 * [Southern Pulled Pork](../../index/s/southern-pulled-pork.json)
 * [Southern Yank Pulled Pork Bbq](../../index/s/southern-yank-pulled-pork-bbq.json)
 * [Spicy Pulled Pork Pushover](../../index/s/spicy-pulled-pork-pushover.json)
 * [Spicy Pulled Pork](../../index/s/spicy-pulled-pork.json)
 * [Super Easy Pulled Pork Sandwiches](../../index/s/super-easy-pulled-pork-sandwiches.json)
 * [Sweet And Savory Slow Cooker Pulled P](../../index/s/sweet-and-savory-slow-cooker-pulled-p.json)
 * [Sweet And Smoky Slow Cooked Pulled Po](../../index/s/sweet-and-smoky-slow-cooked-pulled-po.json)
 * [Sweet And Spicy Ginger Beer Pulled Po](../../index/s/sweet-and-spicy-ginger-beer-pulled-po.json)
 * [Tasty Slow Cooker Pulled Pork](../../index/t/tasty-slow-cooker-pulled-pork.json)
 * [Valerios Pulled Pork Sandwich](../../index/v/valerios-pulled-pork-sandwich.json)
 * [Zesty Pulled Pork Sandwiches](../../index/z/zesty-pulled-pork-sandwiches.json)
 * [Arepas With Pulled Pork And Pickled Onion 108149](../../index/a/arepas-with-pulled-pork-and-pickled-onion-108149.json)
 * [Barbecue Pulled Turkey Sandwiches 355752](../../index/b/barbecue-pulled-turkey-sandwiches-355752.json)
 * [Cuban Pulled Pork Paninis](../../index/c/cuban-pulled-pork-paninis.json)
 * [Pressure Cooker Beer And Mustard Pulled Turkey](../../index/p/pressure-cooker-beer-and-mustard-pulled-turkey.json)
 * [Pulled Brisket Sliders 368731](../../index/p/pulled-brisket-sliders-368731.json)
 * [Pulled Corned Beef 51225010](../../index/p/pulled-corned-beef-51225010.json)
 * [Pulled Flank Steak In Red Wine Sauce Ropa Vieja O Carne Ripiada](../../index/p/pulled-flank-steak-in-red-wine-sauce-ropa-vieja-o-carne-ripiada.json)
 * [Pulled Turkey Barbecue Seibels 14178](../../index/p/pulled-turkey-barbecue-seibels-14178.json)


text:
# Repsheet [![Build Status](https://secure.travis-ci.org/repsheet/repsheet.png)](http://travis-ci.org/repsheet/repsheet?branch=master)

>
> **noun**  *Slang.*
> A record kept by web site authorities of a machine's wrongdoings.
>
> **noun**  *Slang.*
> A necessary tool in your web defense arsenal.
>
> **Origin:**
> [2013]

Repsheet is a collection of tools to help improve awareness of robots and bad actors visiting your web applications. It is primarily an Apache web server module with a couple of addons that help organize and aggregate the data that it collects.

## What problem does it solve?

Repsheet attempts to solve the problem of automated defenses against robots and noisy attackers. It collects and records activity of the IP addresses that access your web sites and helps determine if they are misbehaving. If they are, they are put on the Repsheet. Once there, you can choose to outright deny them access to your site or warn your downstream applications that the requestor is a known bad actor and that the request should be handled differently. Essentially, it is a local reputation engine.

## How does it work?

Repsheet works by inspecting requests as they come into the web server and storing that activity in Redis. It does this in two ways.

First, when a request comes in, the IP is checked to see if it has been flagged by Repsheet. If it has, it acts on that information based on the configuration set. If `RepsheetAction` is set to `Block`, Repsheet instructs Apache to return a 403. If `RepsheetAction` is set to `Notify`, then Repsheet will log to the Apache logs that the IP was found on the repsheet but no action was taken. Repsheet will then add the header `X-Repsheet: true` to the request to make downstream applications aware that the request is from a known bad source. Next, if the `RepsheetRecorder` directive is set to `On`, the the following details are recorded in Redis list using the key `<ip>:requests`

* Timestamp
* User Agent
* HTTP Method
* URI
* Arguments

These are recorded for every request the IP makes.

Second, if the `RepsheetFilter` directive is set to `On`, Repsheet looks at [ModSecurity](http://modsecurity.org) to see if the request triggered any rules. If so, [ModSecurity](http://modsecurity.org) places details into the request headers. Repsheet reads these headers and records information about which rules were triggered and stores them in Redis in the following fashion:

```
sadd <ruleid> <ip>:detected
incr <ip>:<rule>:count
set <ip>:repsheet true
```

In other words, each IP address that triggers a ModSecurity is put on the Repsheet and each rule that has been triggered is recorded as well as how many times that rule has been triggered. Finally, The IP address is flagged as being a repsheet offender.

The high level idea is captured in this drawing:

![Repsheet](https://raw.github.com/abedra/repsheet/master/doc/Repsheet.png)

## What are the benefits?

Repsheet provides some much needed intelligence and visualization around who is acting against your web site(s) and how they might be attacking. All of this data is available when the infrastructure is setup properly, but it isn't correlated or aggregated in any meaningful way. On top of these benefits, it allows for easy addition of an IP to the repsheet by just adding it manually in Redis. This means that you can plug in any activity processing systems you want and have them feed back into the Redis instance that Repsheet reads from. This makes the solution as flexible as you need it to be. It also leaves space for statistical analysis of traffic patterns to run in the background on this data and classify/detect anomalies that can be fed back into Repsheet.

## What are the downsides?

In short, more work. A Redis instance has to be spun up that can handle the data coming in to your site. If you get a lot of traffic, your Redis instance is going to grow. You can configure how many requests are stored for an IP address to limit a single IP address from blowing up your Redis database, but you still have to account for all the IPs that come into contact and how frequently they do so.

Along with this, there is the potential for both [ModSecurity](http://modsecurity.org) and Repsheet to slow down your requests. The [ModSecurity](http://modsecurity.org) slow downs are mostly based on the rules you configure, but you should do some profiling to ensure that [ModSecurity](http://modsecurity.org) isn't causing to large of a delay. Since Repsheet contacts an external service during the request lifecycle in a blocking fashion, the request is slowed down for the duration of that external service call. Fortunately this is configurable in `RepsheetRedisTimeout`. You should keep this as low as possible, and the timeout value is always in milliseconds. This should be profiled as well to ensure that it doesn't cause unnecessary overhead.

## Setup

This module requires [hiredis](https://github.com/redis/hiredis), [apxs](http://httpd.apache.org/docs/2.2/programs/apxs.html), and [pcre](http://www.pcre.org/), and optionally [geoip](http://www.maxmind.com/en/geolocation_landing) (if you want GeoIP support) to be installed. If you want to run the integration tests, you will need to have [Ruby](http://www.ruby-lang.org/en/) and [RubyGems](http://rubygems.org/) installed. The integration tests use [Bundler](http://gembundler.com/), so you need to have that installed as well. The Ruby based programs have all been tested using Ruby 1.9.3.

If you are on OS X, you might have to run the following to make the compile tool-chain work properly with apxs:

```
ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
```

#### Installation

Compilation is done via `apxs`. This is one of the simpler ways to deal with compilation/installation/activation of a module. Repsheet uses autotools to generate `configure` scripts and make files. If you want to build from source you will need to have the [check](http://check.sourceforge.net/) library installed as well as the dependencies listed above.

```
autogen.sh
./configure
make
sudo make install
```

To activate and configure repsheet you will need to set some directives. The following list explains what each directive is and what is does.

* `RepsheetEnabled <On|Off>` - Determines if Repsheet will do any processing
* `RepsheetRecorder <On|Off>` - Determines if request information will be stored
* `RepsheetFilter <On|Off>` - Determines if Repsheet will look for ModSecurity information
* `RepsheetGeoIP <On|Off>` - Determines if Repsheet will look at GeoIP information
* `RepsheetProxyHeaders <On|Off>` - Determines if Repsheet will look for the X-Forwarded-For header to determine remote ip
* `RepsheetAction <Notify|Block>` - Determines the action to take if an IP is found on the repsheet. `Notify` will send a header downstream and `Block` will return a `403`
* `RepsheetPrefix <prefix>` - Sets the logger prefix. This will precede any repsheet apache log lines
* `RepsheetRedisTimeout n` - Sets the time (in milliseconds) before the attempt to connect to redis will timeout and fail
* `RepsheetRedisHost <host>` - Sets the host for the Redis connection
* `RepsheetRedisTimeout <port>` - Sets the port for the Redis connection
* `RepsheetRedisMaxLength <max>` - Number of recorded requests a single IP can have before it is trimmed in Redis
* `RepsheetRedisExpiry <hours>` - Number of hours of inactivity before an entry expires

Here's a complete example:

```
<IfModule repsheet_module>
  RepsheetEnabled On
  RepsheetRecorder On
  RepsheetFilter On
  RepsheetGeoIP On
  RepsheetProxyHeaders On
  RepsheetAction Notify
  RepsheetPrefix [repsheet]
  RepsheetRedisTimeout 5
  RepsheetRedisHost localhost
  RepsheetRedisPort 6379
  RepsheetRedisMaxLength 1000
  RepsheetRedisExpiry 24
</IfModule>
```

##### ModSecurity Settings

In order to take full advantage of Repsheet, you need to have the proper ModSecurity rules setup. This repository packages a working set of rules as an example. They are the  [OWASP Core Rules](https://github.com/SpiderLabs/owasp-modsecurity-crs) base rules plus the optional rule set that perfoms header tagging. You can and should tune these rules so that they work properly for your enviornment, but remember to have the header tagging rules in place or Repsheet will not be able to see what ModSecurity has alerted on.

## Running the Unit Tests

Repsheet has a set of C based unit tests for the core logic. You can run them with `make check` after you have setup your build environment as described above.

## Running the Integration Tests

Repsheet comes with a basic set of integration tests to ensure that things are working. In order to run these, run the following

```sh
script/bootstrap
autogen.sh
configure
make
build/bin/apxs -i -a src/mod_security.la
bundle install
rake
```

The `script/bootstrap` task will take some time. It downloads and compiles Apache and ModSecurity, and then compiles and installs Repsheet and configures everything to work together. Running `rake` launches some curl based tests that hit the site and exercise Repsheet, then test that everything was recorded properly in Redis.

repository: mkonda/repsheet

repo_name: mkonda/repsheet


text:
---
title: Sticking to 1Password 6
description: I've been a long time 1Password user, since version 4, but I never upgraded to AgileBits subscription model and version 6 is the last 1Password version I can use. Sometimes I made mistakes and I've to revert back to this version.
date: 2023-03-25
author: Pietro F. Maggi
draft: false
meta: true
math: false
toc: false
hideDate: false
showAuthor: true
hideReadTime: false
tags:
    - "Software"
    - "Personal"
---

I loved 1Password since the first time I installed it many years ago. I probably got in some OSX Indy developer bundle and I found it liberating.

Over the years, I kept paying for the new version as soon as it was released but around version 7, Agile Bits (the company behind 1Password) decided to transition to a subscription model.

I can understand their decision as I worked as sofware engineer for many years and I can agree that in some scenarios having a 1Password subscription is a no brainer. But not for me so far.

It may happen in the coming years that my family requirements will increase and teaching my children how to corretly handle passwords with a tool like 1Password will be a smart thing to do. But, till that point, I've very limited requirements for 1Password. Requirements that makes very difficult to justify a recurring payment.

For this reason I decided to keep using version 6 with all its limitation but also with the older business model of a perpetual license.

The problem is that sometimes I try to fix something or I'm trying something new and I forget what was the last version of 1Password that I can use. This last time it was to get a Safari extension installed (1Password 6 works for me in Firefox and that is usually more than enough).

Long story short, from Safari, looking for an extension, I installed 1Password 7 from the mac app store...

Once I understood my mistake I removed it and got back to my lovely obsolete version 6... but it was too late. Unlocking it was not working as expected. My password were available in 1Password Mini and through the extension in Firefox, but the main UI was stuck. With no way to use it. Another issues was that, if 1Password Mini was already open, trying to launch 1Password was ending with a dialog showing an error that it was not possible to connect to 1Password Mini.

I searched for a while till finding this [post][1] that points to some folder inside `~/Library/Group Containers/`.

Looking there, I had two different folders:

- `2BUA8C4S2C.com.1password`
- `2BUA8C4S2C.com.agilebits`

Soo, the first thing to try, was to move these two folders somewhere else and relaunch 1Password 6... and IT WORKS.
(yes the first thing to try was also the last one... sometimes it happens).

Ok, so, I solved my problem in this way.

For the record, before finding [that article][1] I also tried to reinstall 1Password 6 from the installer available on the [Agile Bits website][2] (thanks for keeping legacy version available!). But the only way to solve the issue that I found was to remove those two folders.

[1]: https://1password.community/discussion/120371/1password-failed-to-connect-to-1password-mini
[2]: https://1password.com/downloads/mac/

branch_name: refs/heads/main


text:
# docker-aliases
[![Build](https://github.com/schnatterer/docker-aliases/actions/workflows/main.yml/badge.svg)](https://github.com/schnatterer/docker-aliases/actions/workflows/main.yml)
[![Docker Hub](https://img.shields.io/docker/image-size/schnatterer/docker-aliases)](https://hub.docker.com/r/schnatterer/docker-aliases)

(Semi-) automatically generated docker CLI aliases.

Heavily inspired by [oh-my-zsh git plugin](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/README.md)
and [kubectl-aliases](https://github.com/ahmetb/kubectl-aliases).

## Installation

```bash
DOCKER_ALIASES_VERSION=0.7.0
# Download aliases
curl -fSL "https://github.com/schntterer/docker-aliases/releases/download/${DOCKER_ALIASES_VERSION}/default.docker-aliases" \
  > ~/.docker_aliases
# Test aliases in current shell
source "~/.docker_aliases"
# Or load aliases when zsh starts
echo '[[ -f ~/.docker_aliases ]] && source ~/.docker_aliases' >> ~/.zshrc
```
Instead of downloading you could create the aliases yourself. This also allows for configuring the alias generated
(see [Configuring aliases](#configuring-aliases)).

```bash
# Create aliases with docker
docker run --rm schnatterer/docker-aliases:${DOCKER_ALIASES_VERSION} > ~/.docker_aliases
# Create aliases with local node and docker installation, executing script from this repo
node createAliases.js | cat > ~/.docker_aliases
```

Note that there are slight differences between the container (that uses the static docker binary) and docker installed
via the package manager. For example, the static binary does not provide `docker checkpoint`, `docker scan` and `-h`
parameters.

## Learning aliases

Pro tip 1: grep the `alias` command, e.g like so:

```bash
alias | grep 'docker run'
```

Pro tip 2: Use an alias reminder such as [MichaelAquilina/zsh-you-should-use](https://github.com/MichaelAquilina/zsh-you-should-use):

```bash
$ docker run --rm -it --entrypoint javac gcr.io/distroless/java:8
Found existing alias for "docker run --rm -it --entrypoint". You should use: "drrmitep"
```
### Prominent examples

```bash
d # docker" - Note: This might overwrite oh-my-zsh function d(). This can be configured using BINARY_ABBREV_UPPER, see bellow. See also: https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/directories.zsh
dl image # docker pull image
dp image # docker push image
dlg container # docker logs container
dpsa # docker ps -a
drit image # docker run -it image
drrmd image # docker run --rm -d image'
drrmit image sh # docker run --rm -it image sh
drrmitep sh image # docker run --rm -it --entrypoint sh image
drrmep id image # docker run --rm --entrypoint id image
dexit container sh # docker exec -it container sh
drmf container # docker rm -f container

#See https://github.com/docker/compose-cli/blob/main/INSTALL.md
dco # docker compose
dcoup # docker compose up
dcoupd # docker compose up -d
dcob # docker compose build
dcod # docker compose down
dcodv # docker compose down -v
dcolg # docker compose logs
dcolg # docker compose logs
dcol # docker compose pull
dcoex service command # docker compose logs service command
dcof file up # docker compose -f file up
```

### Parameters in aliases

Are implemented by the following rules

* At max 4 parameters within one alias
* At max one non-boolean parameter per alias (must be at the end because of argument)
* Parameters without single character abbreviation (starting in `--`, e.g. `--rm`) are only contained in alias if
  * the parameter has less than three chars
  * has a predefined abbreviation (e.g. `entrypoint` = `ep`)
  * ~~contains a hyphen (is then abbreviated `<first char><first char after hyphen`, e.g. `--log-level` = `ll`)~~
    (can be enable in code but results in thousands of aliases)
* Order of commands and paramaters in alias
  * Commands go first (e.g. `docker run` -> `dr`)
  * Parameters without single character abbreviation go next (e.g. `--rm`),
  * followed by the single character parameters (e.g. `-i`),
  * The non-boolean parameter is always at the end  (e.g. `-v`)
    (otherwise the the command would not be syntactically correct).
  * If multiple Parameters without single character abbreviation or single char params, the order is always alphabetical,
    i.e.  params `a`, `b` and `c` -> aliases `ab`, `ac`, `abc`, `bc`. No aliases: `ba`, `ca`, etc.
    Otherwise there would be way to many aliases.
* Excluded aliased/"duplicated" parameters [introduced in Docker 1.13](https://www.docker.com/blog/whats-new-in-docker-1-13/)
  in order to drastically reduce number of aliases (from 1800 to 1000 aliases at the time of implementing).
  Favor "older" commands (e.g `docker ps`, `docker rmi`) over new ones (e.g. `docker container ls`, `docker image rm`)
  because they are shorter (can be configured in the code, though)

## Configuring aliases

When generating aliases, they can be customized via environment variables.

Note that changing those may or may not work. Especially increasing number of params will result in more conflicts and
even errors as the conflict handling is not perfect.

| env var | default | notes |
| ------- | ------- | ----- |
| BINARY_ABBREV_UPPER| false | Create alias for with binary with capital letter, e.g. alias docker=D. All other aliases are not affected |
| ENABLE_DOCKER_EXPERIMENTAL | true | Create aliases for experimental commands |
| FILTER_LEGACY_SUBCOMMANDS | false | Remove aliases for legacy (but shorter) sub commands such as docker ps, docker rmi, etc. |
| FILTER_LEGACY_SUBCOMMANDS_REPLACEMENTS| true | Remove aliases for newer (but longer) sub commands such as docker container ls, docker image rm, etc. |
| NUMBER_OF_MAX_PARAMS_PER_ALIAS| 4 | Maximals parameter created into one alias, e.g. 4 - docker run --rm -i -t --entrypoint  |
| NUMBER_OF_CHARS_OF_LONG_PARAMS_TO_USE_AS_ALIAS| 2 | Long params (those with `--`) are included into aliase up to this number of chars. E.g. 2: `--rm` is included `--tls` is not. |

Use them like so

* Local node: `ENABLE_DOCKER_EXPERIMENTAL=false node createAliases.js | cat > ~/.docker_aliases`
* Docker: `docker run --rm -e ENABLE_DOCKER_EXPERIMENTAL=true schnatterer/docker-aliases:${DOCKER_ALIASES_VERSION} > ~/.docker_aliases`

## Aliases missing?

* Could be because of conflicts, see TODOs at the end
* Contributions welcome, create an issue or PR.

## Contribute

Contributions welcome!

* Are there aliases missing you use often?
* What are your most used abbrevs? Is one of them missing in the aliases?
  Ask your shell history:

```bash
# Most frequent docker commands
history| grep -E '^ *[0-9\w]*  docker ' | awk '{d = ""; for (f=2; f<=NF; ++f) {if ($f =="|") break; printf("%s%s", d, $f); d = OFS}; printf("\n") }' |sort|uniq -c|sort -rn | grep '\-' | less
# Most frequent sub commands:
history| grep -E '^ *[0-9\w]*  docker ' | awk '{print $2" "$3}' |awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -rn|head -30
```

## Implementation Details

The algorithm tries to create the shortest possible alias without conflicting with other commands. As it does not favor
commands (how should it decide?) the resulting abbreviations are sometimes longer thant necessary (e.g. `image` vs
`ìmages` results in `images` and `images`), so with some manual intervention we decide that they can be shorter.
Some commands that are used very often are manually privileged to get shorter abbreviations than others.
Very much opinionated.

### SubCommands and parameters

Parsing sub commands and creating aliases is fairly simple and results in about 200 aliases.
There already are a couple of conflicts like `di` for `docker` `import`, `image` and `docker images` that are resolved
by the algorithm and/or predefined abbreviations.

Adding parameters per sub command is surprisingly complex, though:

* How to automatically generate useful abbreviations for longer params such as `docker --tlsverify`?
* And the worst: For which combination of parameters to create aliases?
  * `docker run` alone has already almost 100 params - if we created aliases of for permutations of 100 params, that would be 10^157 aliases 😱
  * Let alone the potential conflicts that arise when combining the alias of one sub command with 100 param characters.
  * And who can remember an alias of 100 characters anyway?

So for now the pragmatic solution is as follows:
* Use only params that have a single char abbreviation
* Don't create all permutations of all params of each sub command, but only in alphabetical order,
  e.g. params `a`, `b` and `c` -> `ab`, `ac`, `abc`, `bc`. Not `ba`, `ca`, etc.
* Create only aliases containing at max 3 params.
* In addition, some parameters are defined manually that also can be longer.
* Conflicts are not resolved. Sub commands take precedence, param abbreviations conflicting with sub commands are ignored.
  Interestingly, there are only 5 conflicts (see stderr output)

Here are some numbers (docker `19.03.4-rc1`):
* Only sub commands (no params) - 200 aliases (commit 2f844fc6)
* sub commands and at max one boolean param per alias - 500 aliases (commit 8cd17435)
* sub commands and at max two boolean param per alias (not all permutations but alphabetical) - 1000 aliases (8cd17435)

### Error handling and logging

As the result is printed on stdout, all technical output is printed on stderr. That is, info and errors.
Don't try this at home 😬.

### Why node.js?

Dynamic typing allows for easy change of data structures. As this was implemented more exploratory as a kind of POC, the
data structures were changed quite often. See git history

### Why no unit tests (yet)

Also here: The exploratory / POC nature of development would have caused a lot of unit tests to be thrown away.
Therefore a "golden master" testing approach was more effective here:
Create aliases, implement change, diff with previous aliases.
Once the implemented approach is proven, a lot of refactoring should be done. This time using TDD, validating against
the golden master.

### Potential new features / ideas / TODOs

* How to properly handle parameter conflicts?
  * For short params there is no conflict resolution.
  * In conflicts with subcommands the params could take precedence. But make all maybe 100 aliases of a subcommand longer
    because of one param alias?
* provide CLI options to allow for conveniently creating customized aliases
* native podman support

repository: qs-wang/docker-aliases

repo_name: qs-wang/docker-aliases


text:
---
layout: post
title: Magnetic Wheel Design
category: project
---

I had an idea to invert a motor to actually create a robot that can
traverse metal objects. Here are some helpful links:

* [Batteries in Quadcopters](http://blog.oscarliang.net/how-to-choose-battery-for-quadcopter-multicopter/)
* [Batteries from HobbyKing](http://www.hobbyking.com/hobbyking/store/lithium_polymer_battery_configuration.asp)
* [Magnet Wire Current given Gauge Ratings](http://www.powerstream.com/Wire_Size.htm)
* [Mosfet Driver for Motor](https://www.picotech.com/library/application-note/some-power-pwm-drivers-for-electric-dc-motors#chap8)
* [Wheel Analysis](https://docs.google.com/document/d/1n9gtmQJDs0DBddY5GjQ1xmjQHse4NSgF6Zv-tek4XfU/edit?usp=sharing)

gha_language: CSS


text:
# Contributing in @webpack-contrib

We'd always love contributions to further improve the webpack / webpack-contrib ecosystem!
Here are the guidelines we'd like you to follow:

- [Questions and Problems](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Pull Request Submission Guidelines](#submit-pr)
- [Commit Message Conventions](#commit)

##  Got a Question or Problem?

Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack).
StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack).
The issue tracker is for bug reports and feature discussions.

##  Found an Issue or Bug?

Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.

We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:

- version of Webpack used
- version of the loader / plugin you are creating a bug report for
- the use-case that fails

A minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem.

We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.

Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.

##  Feature Requests?

You can _request_ a new feature by creating an issue on Github.

If you would like to _implement_ a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project.

##  Pull Request Submission Guidelines

Before you submit your Pull Request (PR) consider the following guidelines:

- Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort.
- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
- Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored.
- Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account.

##  Webpack Contrib Commit Conventions

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.

The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.

Examples:

```
docs(readme): update install instructions
```

```
fix: refer to the `entrypoint` instead of the first `module`
```

### Revert

If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit.
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

### Type

Must be one of the following:

- **build**: Changes that affect the build system or external dependencies (example scopes: babel, npm)
- **chore**: Changes that fall outside of build / docs that do not effect source code (example scopes: package, defaults)
- **ci**: Changes to our CI configuration files and scripts (example scopes: circleci, travis)
- **docs**: Documentation only changes (example scopes: readme, changelog)
- **feat**: A new feature
- **fix**: A bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **revert**: Used when reverting a committed change
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
- **test**: Addition of or updates to Jest tests

### Scope

The scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.

### Subject

The subject contains a succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

### Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

### Footer

The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

Example

```
BREAKING CHANGE: Updates to `Chunk.mapModules`.

This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
Migration: see webpack/webpack#5225

```

## Testing Your Pull Request

You may have the need to test your changes in a real-world project or dependent
module. Thankfully, Github provides a means to do this. Add a dependency to the
`package.json` for such a project as follows:

```json
{
  "devDependencies": {
    "mini-css-extract-plugin": "webpack-contrib/mini-css-extract-plugin#{id}/head"
  }
}
```

Where `{id}` is the # ID of your Pull Request.

## Contributor License Agreement

When submitting your contribution, a CLA (Contributor License Agreement) bot will come by to verify that you signed the [CLA](https://easycla.lfx.linuxfoundation.org/#/?version=2).
If it is your first time, it will link you to the right place to sign it.
However, if you have committed your contributions using an email that is not the same as your email used on GitHub, the CLA bot can't accept your contribution.

Run `git config user.email` to see your Git email, and verify it with [your GitHub email](https://github.com/settings/emails).

## Thanks

For your interest, time, understanding, and for following this simple guide.

repository: webpack-contrib/mini-css-extract-plugin

repo_name: webpack-contrib/mini-css-extract-plugin


text:
# CA05
Logistic Regression

Project Overview
This project practices building a binary classifier model to predict the CVD Risk (Yes/No, or 1/0) using a logistic regression model.

## Requirements
The following can be used to run the Python code for this project:

 - [Google Colab](https://colab.research.google.com/notebooks/intro.ipynb#recent=true)

### Installation
The following packages are needed for this project:
```python
import pandas as pd
import numpy as np
from sklearn import linear_model
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
from sklearn import metrics
```

## Project File and Data
You can access the [Project](https://colab.research.google.com/drive/1NpulzbeHzaHtJ62ub_Q7MqjuTJcCjGbU#scrollTo=vpnVtV4Lsynr) through this link.

Download the data here: [Data](https://raw.githubusercontent.com/ArinB/CA05-B-Logistic-Regression/master/cvd_data.csv)

## Trouble Shooting
It is unclear if the model is performing at an optimal level.

## Credits and Acknowledgments
Thank you Professor Arin Brahma of Loyola Marymount University for providing the file template and dataset.

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# Library

The following libraries are automatically exported and will be available to use throughout your app:

| **Name:** | **Initialized with:** |
| --- | --- | --- |
| `jwt` | `require('jsonwebtoken')` |
| `bcrypt` | `require('bcrypt')` |

#### Usage

```javascript
const { jwt } = cuk.pkg.auth.lib
jwt.sign({
  first_name: 'James',
  last_name: 'Bond'
}, 'mysuperdupersecretkey')
```


text:
---
title: "Ballistic(?) transport in graphene antidot super-lattices"
collection: talks
type: "Talk"
permalink: /talks/2017_dpg
venue: "German Physical Society (DPG) Spring Meeting 2017"
date: 2017-03-01
location: "Dresden, Germany"
---

Talk about the first year of my PhD project, in which we found signatures of ballistic motion in devices with mean free path much too short to allow for such signatures to be visible.


text:
# What should I do with my break?

This is a simple app built with vanilla JavaScript to help me figure out what to do with my breaks.

I got the fancy toggler from [here](https://www.cssscript.com/realistic-ios-switch-pure-css/).

I'm most proud of the fact that I use a binary decision making tree to avoid having a huge if/else statement.

Enjoy! 🎉

repository: rmorabia/default-decision-matrix

repo_name: rmorabia/default-decision-matrix


text:
TipCalc
=======

`TipCalc` has been ported to a sample in https://github.com/slodge/MvvmCross/tree/master/Sample%20-%20Tutorial/Tutorial - see https://github.com/slodge/MvvmCross/wiki/Tutorial-Part-3:-TipCalc

![TipCalc MvvmCross](https://github.com/slodge/MvvmCross/raw/master/Sample%20-%20Tutorial/Help/TipCalc.png)

repository: slodge/mobile-samples

repo_name: slodge/mobile-samples


text:
## Ident

This plugin implements a peer identification layer for an
`xudp.Connection`. It embeds a 32 byte SHA256 hash of the peer's local
IP and port into each packet. Combined with the peer's public IP address,
this allows us to accurately identify multiple peers sending data from the
same NAT router/firewall.

Accessing this identifier is done through a PeerFunc handler
we supply to the plugin. Whenever a new packet arrives, this handler
is called with the unique peer hash and the payload.

The hash is generated from the client's internal NAT address and port.
Combined with the public IP, this gives us a reliable key by which to tell
them apart.

The internal port is not strictly necessary for the outside world, but it
is needed when two peers from the same local IP talk to each other.
This happens when two clients are run on the same computer. The only thing
setting them apart is their local port number.

The hash is implemented as follows:

	private := SHA256(private_ip + private_port)
	hash := Base64( SHA256( public_ip + public_port + private ) )

The private part is included in every outgoing packet.

### Usage

    go get github.com/jteeuwen/xudp/plugins/ident

### License

Unless otherwise stated, all of the work in this project is subject to a
1-clause BSD license. Its contents can be found in the enclosed LICENSE file.

repository: tsingson/xudp

repo_name: tsingson/xudp


text:
---
title: Styling in kramdown
tags: [Jekyll]
header:
      image: /assets/images/kram.jpg
      teaser: /assets/images/kram.jpg
---

A year spent in **Artificial Intelligence** is enough to make one believe in god. --Alan Perlis
{: .notice--info}

I always wondered how someone can use this notices and buttons. And finally, I'm also able to do it :v:.
Thanks to [Michael Rose](https://mademistakes.com/), he gave an amazing guide to use and customize his theme `minimal mistakes`.
While going through the guide, I came across a good explanation of using Kramdown Markdown renderer for styling
markdown posts.

# Buttons
You can make simple buttons very easily using built in kramdown support for `.btn` class.

```html
<a href="#" class="btn">Link Text</a>
```

| Button Type   | Example | Class | Kramdown |
| ------        | ------- | ----- | ------- |
| Default       | [Text](#link){: .btn} | `.btn` | `[Text](#link){: .btn}` |
| Success       | [Text](#link){: .btn .btn--success} | `.btn .btn--success` | `[Text](#link){: .btn .btn--success}` |
| Warning       | [Text](#link){: .btn .btn--warning} | `.btn .btn--warning` | `[Text](#link){: .btn .btn--warning}` |
| Danger        | [Text](#link){: .btn .btn--danger} | `.btn .btn--danger` | `[Text](#link){: .btn .btn--danger}` |
| Info          | [Text](#link){: .btn .btn--info} | `.btn .btn--info` | `[Text](#link){: .btn .btn--info}` |
| Inverse       | [Text](#link){: .btn .btn--inverse} | `.btn .btn--inverse` | `[Text](#link){: .btn .btn--inverse}` |
| Light Outline | [Text](#link){: .btn .btn--light-outline} | `.btn .btn--light-outline` | `[Text](#link){: .btn .btn--light-outline}` |

| Button Size | Example | Class | Kramdown |
| ----------- | ------- | ----- | -------- |
| X-Large     | [X-Large Button](#){: .btn .btn--x-large} | `.btn .btn--x-large` | `[Text](#link){: .btn .btn--x-large}` |
| Large       | [Large Button](#){: .btn .btn--large} | `.btn .btn--large` | `[Text](#link){: .btn .btn--large}` |
| Default     | [Default Button](#){: .btn} | `.btn` | `[Text](#link){: .btn}` |
| Small       | [Small Button](#){: .btn .btn--small} | `.btn .btn--small` | `[Text](#link){: .btn .btn--small}` |

# Notices
Notice can catch your attention very easily. It's a best way to highlight any point.
Following code snippet will produce below notice.
```markdown
**Watch out!** This paragraph of text has been emphasized with the `{: .notice}` class.
{: .notice}
```
`.notice` tag highlights paragraph above it. This paragraph can have Markdown formatting.
Here is some examples of different type of notices.

**Watch out!** This paragraph of text has been emphasized with the `{: .notice}` class.
{: .notice}

**Watch out!** This paragraph of text has been emphasized with the `{: .notice--primary}` class.
{: .notice--primary}

**Watch out!** This paragraph of text has been emphasized with the `{: .notice--info}` class.
{: .notice--info}

**Watch out!** This paragraph of text has been emphasized with the `{: .notice--warning}` class.
{: .notice--warning}

**Watch out!** This paragraph of text has been emphasized with the `{: .notice--success}` class.
{: .notice--success}

**Watch out!** This paragraph of text has been emphasized with the `{: .notice--danger}` class.
{: .notice--danger}


text:
---
layout: post
title: looking for ideas for our wikimania talk on open scholarship tools
categories:
- wikimania
- open access
- London
- toolbox
---

Inspired somewhat by the aweome [http://sciencetoolbox.org](http://sciencetoolbox.org), along with Martin Fenner, we proposed a session
for the upcoming Wikimania conference. We will be talking about Open Scholarship Tools on Sunday the 10th of August at 9:30 am. In our [outline](https://docs.google.com/a/elifesciences.org/document/d/133LXxlgeJfvAtUJCMdGLGKiLIhGhpnNcaJu5UX29fJc) for our talk we
have decided to possibly think about:

- CrossRef API (and possibly also the DataCite and ORCID APIs)
- Pandoc
- Rstudio
- Zotero
- iPython Notebook
- Plotly
- Datawrapper

What do you think we should try to cover in our 30 minute slot?

repository: IanMulvany/partiallyattended

branch_name: refs/heads/gh-pages

gha_language: HTML

repo_name: IanMulvany/partiallyattended


text:
---
title: Roblox Attachment
date: 2021-12-12 14:00
summary: An object that describes a point and orientation relative to a BasePart
tags:
  - Roblox
cover: /_media/roblox-attachment-cover.png
hide_cover_in_article: true
---

An `Attachment` in Roblox is an object that describes a point and orientation in space relative BasePart's [[Roblox CFrame]].

Consider a `Fire` that you want to burn from the back of a `Part`. If I attach a `Fire` instance directly to a `Part`, it will always burn from the `Part`'s center of the Part. Instead, I can create an `Attachment` parented to the `Part` and position it -2 studs along the X-axis and one stud along the Y-axis from the Part's center.

The `Attachment` remains in the same place relative to the `Part` as the part moves.

<video controls loop autoplay><source src="/_media/roblox-attachment-low.mp4" type="video/mp4"></video>

Here's how it looks in code:

```lua
--!strict

-- Create Part.
local part: Part = Instance.new('Part')
part.Anchored = true

-- Create an Attachment behind the Part.
local attachment: Attachment = Instance.new('Attachment')
attachment.Position = Vector3.new(-2, 1, 0)
attachment.Parent = part

-- Attach fire to Attachment instead of Part.
local fire: Fire = Instance.new('Fire')
fire.Size = 1
fire.Heat = 1
fire.Parent = attachment

part.Parent = game.Workspace

-- Code to move Part around below.
```

A new attachment can be created using `Instance.new('Attachment')`.

An attachment's position can be updated using the `Position` attribute or editing the `CFrame` attribute.

There are many items that you can parent directly to an `Attachment` instead of a `Part`:

* Any `ParticleEmitters` can be parented directly to an `Attachment.`
* `Sound` objects allow audio to play directly from the `Attachment`'s location.
* `PointLight` and `SpotLight` allow light to shine from a specific point on a Part.

[[Roblox Constraint]] objects rely on Attachments.

The [[Roblox Accessory]] system utilizes attachments to position accessories on a character's body parts.

path: /notes/permanent/Roblox Attachment.md

filename: Roblox Attachment.md

gha_language: Jupyter Notebook


text:
# CSE143XFreestyle
occasional implementation of cse 143x homework yet without considering class limitations.

## Warning:
This project focuses on off-syllabus coding for the homework tasks. Using any algorithm from the project is highly possible of causing a fail in your course. Copying codes from this project may also be considered as plagiarism, so definitely don't rely on any of these for homework.

### However:
This is not to keep any of you from implementing homework in crazy and creative ways! Please contribute to this repository and let all of us see what codes can be!

gha_language: Java


text:
Socket.io Sample App
====================

Example application using Socket.io. Simply pulls in tweets from Twitter with
the keywords iojs, javascript, es6, and Modulus.

## Configuration

The variables in `config.js` need to be configured in order to pull in tweets.
If the variables are not configured, the app will not poll for tweets.

Config.js format:

```javascript
module.exports = {
  consumer_key: process.env.CONSUMER_KEY || 'ConsumerKey',
  consumer_secret: process.env.CONSUMER_SECRET || 'ConsumerSecret',
  token: process.env.TOKEN || 'Token',
  token_secret: process.env.TOKEN_SECRET || 'TokenSecret'
};
```

You can choose not to configure the config variables and import them from your start script.

```
$ CONSUMER_KEY='ConsumerKey' CONSUMER_SECRET='ConsumerSecret' TOKEN='Token' TOKEN_SECRET='TokenSecret' node app.js
```

## License

The MIT License (MIT)

Copyright (c) 2015 Modulus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: XervoIO/socketio-example

repo_name: XervoIO/socketio-example


text:
---
id: installation
title: Installation
hide_title: true
sidebar_label: Installation
slug: /
---

## Installation

First, install `@x0s3/katachi` in your app:

```bash npm2yarn
yarn add @x0s3/katachi
```

## Install React-Hook-Form

Katachi requires that you install `react-hook-form`. The minimum version of RHF it's been tested on is `6.15.5`.

```bash npm2yarn
yarn add react-hook-form
```

:::tip
We highly recommend installing as well `@hookform/resolvers`
:::


text:
---
layout: post
tags: [algorithms, python]
title: How to Generate Prime Numbers? (Python)
---
Primary numbers are cool. You can factorize (decompose) any number into product of primes, amazingly, each number has a single unique decomposition. Primes are like simple building blocks for all the other numbers, which are called composites.  Generating and checking if number is a prime is the basis for many crypto systems like RSA. So, it make sense to know what's up.

For generating a set of primes up to N we will use Eratosthenes Sieve method which was written down by this Greek guy. Idea is, as usual, very simple and elegant:

* Make a list of numbers 2..N.

* Starting with first element in the list, cross all its multiples in the list.

* Repeat until no multiples less than N left.

In other words, we just start with the smallest prime (2) and remove all its multiples less than N; then take next prime (3) and do the same; then next prime would be (5) since (4) is already crossed.

Here is Python snippet:

{% highlight python linenos %}
def eratosthenes_sieve(n):
    numbers = [i for i in range(2, n)]
    pi = 0 # index
    while pi < len(numbers):
        p = numbers[pi] # current prime
        i = 2 # start with closet multiple
        while p * i <= n: # while multiple less than N -> remove it from the list (if it is still in)
            if numbers.__contains__(p * i):
                numbers.remove(p * i)
            i += 1
        pi += 1
    return numbers
{% endhighlight %}

That was easy. Okay, let's try to optimize. Let us observe what happens when we remove multiples:
* 2 -> remove: 4, 6, 8, 10, 12, 14, 16...

* 3 -> remove: **6**, 9, 12, 15 ...

* 4 -> remove: **8**, **12**, **16** ...

* 5 -> remove: **10, 15, 20**, 25 ...

Interestingly, each time we try to find multiples for next prime, we see, that first multiples were already removed on the previous steps. By going further we can prove, that all the multiples less than current prime squared were already removed. That means we can trim this part of checks:
{% highlight python linenos %}
def eratosthenes_sieve_refine(n):
    numbers = [i for i in range(2, n)]
    pi = 0
    while True:
        p = numbers[pi]
        p_sq = p ** 2
        if p_sq > n:
            break
        while p_sq <= n:
            if numbers.__contains__(p_sq):
                numbers.remove(p_sq)
            p_sq += p
        pi += 1
    return numbers
{% endhighlight %}

Next optimization is about which structure we use. Instead of expensive checking __contains__, we can do array of bools:
{% highlight python linenos %}
import math
def eratosthenes_sieve_bool(n):
    prime_bool = (n + 1) * [True] # since indexing starts with 0
    for p in range(2, int(math.sqrt(n)) + 1): #int floors the float
        if prime_bool[p]:
            for i in range(p ** 2, n + 1, p): # p^2, p^2 + p, p^2 + 2p ...
                prime_bool[i] = False
    return [i for i, elem in enumerate(prime_bool) if elem][2:]
{% endhighlight %}

Finally, we can also observe, that all the **even** numbers are composites. So we can init our bool array with Falses at the beginning; then we can do 2p step instead if singe p, since 2p is always even number.

{% highlight python linenos %}
def eratosthenes_sieve_bool_odd(n):
    prime_bool = [True, True, True] + (n / 2 - 1)  * [True, False]
    for p in range(2, int(math.sqrt(n)) + 1): #int floors the float
        if prime_bool[p]:
            for i in range(p ** 2, n, 2 * p):
                prime_bool[i] = False
    return [i for i, elem in enumerate(prime_bool) if elem][2:]
{% endhighlight %}

Now let's check the real performance with N = 2000:
{% highlight python linenos %}
import time
start = time.time()
eratosthenes_sieve(2000)
end = time.time() - start

eratosthenes_sieve exec time: 0.018317937851
eratosthenes_sieve refine exec time: 0.0219550132751
eratosthenes_sieve bool exec time: 0.00025200843811
eratosthenes_sieve bool odd time: 0.000149965286255
{% endhighlight %}

Understandably, bool version with both improvements (init with odds and start with p^2) works the fastest.

PS Funny fact: gcd(x,y) * lcm(x,y) = x * y, where gcd - Greatest Common Divisor, lcm - Least Common Multiple.


text:
Jenkins Alfred Workflow
=======================

An Alfred workflow based on [alfred-workflow](https://github.com/deanishe/alfred-workflow), which provides fuzzy search for Jenkins jobs and filtering based on job status.

License
-------

[MIT](LICENSE)

repository: davidparsson/jenkins-alfred-workflow

repo_name: davidparsson/jenkins-alfred-workflow


text:
---
layout: post
title: Interaction Design Mindmap
category: ux
tags: [ux]
---

Here is the [interaction Design Mindmap](https://www.processon.com/view/link/56306280e4b0ae8573ff4f8e)[online version] made by Joey.

![Interaction Design Mindmap](http://upload-images.jianshu.io/upload_images/119048-65dc41e025cfb507.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

I would like to use the Mindmap to connect all useful principles or concepts together, which can help me organize the knowledge I have learnt better. Afterwards, with accumulating of my knowledge, hopefully I am gonna form my typical thinking pattern for interaction design.


text:
# 1DS Bond Inspector for Fiddler

This is 1DS Common Schema / Bond decoder for Fiddler.

Please build and deploy to *%LOCALAPPDATA%\Programs\Fiddler\Inspectors*

# How to use

- download and install Fiddler
- make sure SSL decoding is enabled (Collector uses TLS 1.2+)
- ingest some 1DS test traffic from a test app, e.g. EventSender example
- navigate to the list of HTTP requests
- filter by your collector end-point or your test app name
- click on collector HTTP request of interest
- click on *Inspectors* tab -> *1DS Events* tab
- enjoy an event decoded from Bond to human-readable JSON
- copy-paste JSON to pretty-print, OR
- use the built-in indented format

# Fiddler.exe.config

You may occasionally encounter a `Newtonsoft.JSON` assembly loading issue with a specific version of Newtonsoft/Fiddler.
If and when that happens - 1DS inspector should show an exception in the decoded output window.
This could happen when a more recent Fiddler is installed with a version of Newtonsoft that differs from the one used by 1DS Bond Inspector plugin.

Exit Fiddler first.

Then use the Binding Redirect feature as follows in *Fiddler.exe.config* to redirect to the currently deployed version:

```
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <generatePublisherEvidence enabled="false"/>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <appSettings>
    <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
  </appSettings>
</configuration>
```
In example above - we redirected the Newtonsoft.Json assembly version from 0-12 to 11 used by Fiddler.
Please make sure you redirect to version employed by your Fiddler installation.
Place this file above (Fiddler.exe.config) to %LOCALAPPDATA%\Programs\Fiddler\ next to Fiddler.exe
Then restart Fiddler.exe . This should solve the Newtonsoft loading issue.

Happy Fiddling!


text:
---
type: Index
---

# What we do

We help open source projects for public organizations (like cities) become successful, build sustainable communities around them and create a thriving public open source ecosystem.

[Our mission](organization/mission.md) is to create a viable future for public organizations and civic operating systems that are highly participatory and drive societal engagement.
We do this through ecosystem level [codebase stewardship](activities/index.md) of both software and civic code enabling collaboration and re-use at scale.

Read more about:

* [our activities and services](activities/index.md) (starting summer 2019)
* [our organization](organization/index.md)
* [our roles and open positions](roles/index.md)
* [glossary of terms and concepts](glossary/index.md)

Additionally we have separate sites that show our [projects](https://projects.publiccode.net) and [how to use the brand](https://brand.publiccode.net/).

repository: nixpad/about

repo_name: nixpad/about


text:
---
layout: post
title: DNA Isolation & Quantification - Additional C.bairdi gDNA from Sample 6129_403_26
date: '2020-02-10 14:12'
tags:
  - gDNA
  - DNA isolation
  - DNA quantification
  - tanner crab
  - Qubit 3.0
  - dsDNA BR assay
  - Chionoecetes bairdi
categories:
  - Miscellaneous
---
[Earlier today I isolated gDNA from C.bairi 6129_403_26 hemolymph pellets](https://robertslab.github.io/sams-notebook/2020/02/10/DNA-Isolation,-Quantification,-and-Gel-C.bairdi-gDNA-Sample-6129_403_26.html) and recovered decently intact gDNA that could be used for sequencing. However, I still need more gDNA, so will isolate that (and co-isolate RNA, since I'm going through the procedure anyway) using the rest of the sample using the Quick DNA/RNA Microprep Plus Kit (ZymoResearch).

Followed the manufacturer's protocol with the following notes/changes:

- Used 480uL of sample, combined with 1:1 H2O (480uL), with 4:1 Lysis Buffer (3840uL) and mixed in 15mL conical

- Flow-through was retained in a 15mL concial for RNA isolation

- Eluted with 45uL

I combined this isolation with the [isolation from earlier today](https://robertslab.github.io/sams-notebook/2020/02/10/DNA-Isolation,-Quantification,-and-Gel-C.bairdi-gDNA-Sample-6129_403_26.html). I have updated that post to reflect this.

Quantified on the Roberts Lab Qubit 3.0 using the dsDNA BR Assay (Invitrogen) and 2uL of sample.

---

#### RESULTS

Qubit results (Google Sheet):

- [20200210_qubit_crab_gDNA-02](https://docs.google.com/spreadsheets/d/1aXLykULO63w-Y7diGGv_cSndkIu7uHWTBkhGpPQMGnU/edit?usp=sharing)

[DNA] = 40.7ng/uL in ~70uL

Yield = ~2849ng

Sample was stored at -80oC in:

[Rack 15, 4, 5](http://b.link/srlab-80C) in [C.bairdi gDNA Box #2](https://docs.google.com/spreadsheets/d/1EnI5UlvN8qoT3pB0VcP6Eu44BdiyyElToYA9VwukPEE/edit?usp=sharing)

This is still too low for PacBio sequencing. The UW facility suggests 5-8ug for 50X coverage of a 2Gbp genome (which is a rough guesstimate of the Tanner crab genome size) for a decent genome assembly. Maybe I can just send them 2000ng and see what we get out of it? Or, maybe I'll just isolate DNA from some other individuals and pool them. Will discuss with Steven and see how he feels about this.

repository: RobertsLab/sams-notebook

gha_language: Shell

repo_name: RobertsLab/sams-notebook


text:
# Changelog

### 0.1
*Sep 17 2014*

**Initial release**
- Installs basic stuff needed to compile rbenv
- Installs rbenv into `/root`

### 0.2
*Nov 10 2014*

- Update rbenv and ruby-build so they include latest definitions

### 0.3
*Dec 8 2014*

- Update rbenv and ruby-build so they include latest definitions

### 0.4
*Mar 10 2015*

- Add new packages to build environment (as suggested by rbenv)
- Update rbenv and ruby-build definitions

repository: macool/baseimage-rbenv-docker

repo_name: macool/baseimage-rbenv-docker


text:
# Summary of Electrical Connections between Pi Zero and Arduino Nano

The basic connections are:

 1. Ground - ideally several ground points will prevent problems with power and data
 2. 5v
 3. TX - data transmit
 4. RX - data receive

NOTE: This leaves many pins free for other uses on the Raspberry Pi Zero!

Connection header - The UK MARS Bot provides a 4 pin header with the above connections. Although it only contains a single ground, it’s probably good enough to experiment with as long as the header is tight.

Nano TX / Pi Zero - voltage conversion to protect the Pi Zero receive - two resistors will change the voltage level from 5v on the Nano to 3v on the Raspberry Pi. 3k3 ohm connected to ground, 2k2 connected to Nano TX.

![Converting 5v TX to 3v3 RX](images/potential_divider.png)

The TX from the Pi Zero will be ok to be wired into the Nano RX pin - the voltage levels are safe, and the voltage level should be high enough to trigger the input.

## Nano RX override

Obviously if we are using the UART to communicate to the Nano, when reprogramming the Nano, we need to disable the transmit pull up from the Pi Zero so that the USB chip can pull down the RX line on the Nano (through the 1K resistor).

There are three options:

1. Overriding the USB converter, but allowing it to program the Arduino Nano. This will require a Schottky diode - say 1N5817 - to make the raspberry Pi TX only pull down the input. As long as both the programmer and the Raspberry Pi are not communicating at the same time, this approach will work.

2. Remove the Raspberry Pi serial connections before programming the Arduino Nano.

3. Get the Raspberry Pi to program the Arduino Nano.

The second option 2 what I will use, but the diagram below shows the optional diode required from option 1.

## Raspberry Pi GPIO Header - UART and Power

![Pi Zero Header UART detail](images/PiZeroUart.png)

(from https://pinout.xyz/pinout/io_pi_zero)

## UKMarsBot Serial Header

![Nano Serial Header](images/Nano_Serial_header.png)

## Wiring up the two units

![UK Mars Bot Serial to Pi Zero schematic wiring diagram](images/Raspberry_Pi_connection.png)

## Images

The images show: Red (+5V), Brown (Rx - Receive to Arduino), Black (0v/Ground), White (Tx - Transmit from Arduino).

Notice some of these images show an addition blue wire. This is connected (via a schottky diode) to the reset pin - thoeretically so a GPIO on the Pi Zero can pull down and reset the Arduino for programming. The diode avoids the GPIO on the Pi Zero pulling up or fighting the other part of the circuit. This method of resetting has not been tested.

![Motherboard View of Connections](images/motherboard_connector_wiring.jpg)
![Pi Connections View](images/pi_connections_view.jpg)

This shows the two resistors, basic soldering for the inline lead. The yellow, green and blue sleeving is heat shrink tubing and it will be moved over the solder joins and protect the wires from shorting. The final assembly had larger black heat shrink tubing over all the wires - you can see this on the other images (e.g. on the mechanical pages).
![Wiring Loom](images/wiring_view.jpg)


text:
# dV3wConverter

## Overview

3wConverter tool is used to:

* convert 3w file created by XYZware to GCODE file,
* convert GCODE files to 3w file that can by used by XYZware,
* print 3w file on XYZprinting printer.

## Installation
To compile this software is needed the Microsoft Visual Studio C++ compiler with cmake and git support.

This software was tested with version 2019 of Visual Studio.

To download all needed library and compile the program run script: **dV3wConverter.cmd**

This script assumes that Visual Studio IDE is installed in "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE" directory.

You can adjust this by changing the variable **MSVSIDE** at line 18 in **dV3wConverter.cmd**  file.

The **git** utility is needed to download all necessary library.

The script try to use a **git** version supplied with Visual Studio but it sometimes fail for no reason.

To disable using Visual Studio git version comment out line 22 in **dV3wConverter.cmd** file (by adding at beginning of this line **REM**) and install **git for Windows**.

## Usage
**Converting:**

  dV3wConvertre ([/W] | [/G]) [/Y] (<input file> | [-]) (<output file> | [-]) [prefix file]

**Printing:**

  dV3wConvertre ([/PW] | [/PG]) (<input file> | [-]) <com port[:com speed]>

Input or/and output file can be "-" to read or write to stdin or stdout.

## Example:
**Extracting GCODE from 3w file:**

  dV3wConvertre /W [/Y] Input_3w_File Output_GCODE_File [Output_Prefix_File]

**Creating 3w file from GCODE:**

  dV3wConvertre /G [/Y] Input_GCODE_File Output_3w_File [Input_Prefix_File]

For creating 3w file the 3w file prefix is needed.
If the 3w file prefix is not specified on the command line it is assumed that it is given at beginning of input file.

**Printing 3W file:**

  dV3wConvertre  /PW Input_3w_File com12

**Printing GCODE file:**

  dV3wConvertre  /PG Input_GCODE_File com12

**Switch list:**
 * /W - input file for conversion in 3w format
 * /G - input file for conversion in GCODE format
 * /PW - input file for printing in 3w format
 * /PG - input file for printing in GCODE format
 * /Y - overwrite files

## 3w file structure
![](https://github.com/AndWalu/dV3wConverter/raw/master/dV3wConverter/Documentation/img/3w_file.gif)

license: Unlicense

gha_license_id: Unlicense


text:
---
layout: post
title: Under the hood of Docker Container Technology
category: DevOps
comments: true
description:
tags:
    - Linux Kernel
    - Container
    - Docker
    - DevOps
---

In this post I will deep dive into `Docker` architecture and demystify how it works under the hood, you will learn what really happens when you run `docker run <image>`.

To be continued ...


text:
# ArTruncator

Now you can do tablename.truncate. This was not incorporated into AR
as a patch because SQLite does not support truncate statements. See this
pull request for more detail:

https://github.com/rails/rails/issues/5510

I'm releasing this as a gem, so I don't have to add it to my
config/initializers.

This has so far only been tested for mysql2 adapater/MySQL DB.

Why truncate versus delete * ? Its more performant and it resets the
primary key ID to 1. Useful when you're re-seeding/testing.

## Installation

Add this line to your application's Gemfile:

    gem 'ar_truncator'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ar_truncator

## Usage

If you have a model called Dummy, to truncate it do:

Dummy.truncate

This will execute the following sql:

"Truncate tabel Dummies".

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
# Smells Like Bakin
Smells Like Bakin is a Cupcake web site sample. It was build in 2013 following [Team Tree House](www.teamtreehouse.com) tutorial. I decided to refactory the project and include Sinatra with ActionMailer to handle the emails delivery.

![Alt text](/img/main_site.png?raw=true "Smells Like Bakin")

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

## Installing

Clone the repository on your local machine and run bundle.

```shell
git clone git@github.com:rafaelrochasilva/smellsLikeBakin.git
```

```shell
bundle install
```

## Running the server
The shotgun/thin web app server runs on http://<IP_ADDRESS>:9393/ port.
To run the app, just type the command:

```shell
shoutgun
```

## Built With

* [Sinatra](http://www.sinatrarb.com/) - Web framework - TBD
* [Ruby](https://www.ruby-lang.org/en/) - Programming Language
* [ActionMailer](http://guides.rubyonrails.org/action_mailer_basics.html) - Used to delivery emails
* [Picture Fill](https://github.com/scottjehl/picturefill) - A responsive image polyfill
* [FitVids](http://fitvidsjs.com/) - jQuery plugin for fluid width video embeds
* [FitText](http://fittextjs.com/) - jQuery plugin for inflating web type

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/rafaelrochasilva/smellslikebakin/tags).

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

repository: rafaelrochasilva/smellsLikeBakin

repo_name: rafaelrochasilva/smellsLikeBakin


text:
## Network Analytics - Custom Centrality Measures
### Identifying at risk students from phone call records

**To view the notebook in nbviewer [click here](https://nbviewer.jupyter.org/github/julian-west/network-centrality-suicide-prevention/blob/master/Network%20centrality%20measures%20-%20suicide%20risk.ipynb)**

Project completed as part of the Imperial College Business School MSc Business Analytics course. Developing a custom centrality measure to identify important members of a social network and their influence over others in the network.

### Brief
> A high-school Suicide and Distress Counseling service has data on the phone calls between 27 high-school students (a who-talks-to-whom network). One of its directors believes network analytics will help it proactively monitor and help students in distress.

One of the concerns in sociology of young adults is the prevalence of suicide-pacts between pairs of friends. The Director wants to come up with a measure so that if they identify a person as potentially troubled, they can identify a “paired” subject that they can reach out pro-actively to assess suicide risk. It is known that potential at-risk students become increasingly withdrawn

Given this information, develop a centrality measure which identifies the most at risk students in the network.

*unfortunately the raw data used for this project cannot be included in this repository.

------------------

**Libraries used**
- Networkx
- Pandas
- Numpy

- Matplotlib
- Seaborn


text:
---
title: "Paper digest: UShER - placing new genomes onto a existing phylogenetic tree (Nat Genet, 2021)"
date: 2022-09-20
permalink: /posts/2022-09-20/usher-paper
categories:
  - Paper digest
tags:
  - Usher
  - Phylogenetics
  - Bioinformatics
toc: true
last_modified_at: 2022-09-21
---

The paper titled [Ultrafast Sample placement on Existing tRees (UShER) enables real-time phylogenetics for the SARS-CoV-2 pandemic](https://doi.org/10.1038/s41588-021-00862-7) introduced a tool ([UShER](https://usher-wiki.readthedocs.io/en/latest/) for fast sample placement on existing trees.). Now this software is wildly used in SARS-CoV-2 genome placement.

## Background
Typical phylogenetic applications re-infer the full phylogeny every time when new viral genome sequence is collected, which takes too long time. If a new genome sequence could be contextualized by placing samples onto an existing "reference phylogeny", that would be great. Existing methods are far too slow.

## Results in this paper
### Efficient data structure
  1. [mutation-annotated tree](https://www.nature.com/articles/s41588-021-00862-7/figures/1)
  2. [preprocessed protocol buffer](https://developers.google.com/protocol-buffers).

### Maximum parsimony addition of samples onto an existing phylogeny
  1. Branch parsimony score (BPS), which is the minimum number of additional mutations (the parsimony score) required to accommodate a sample placement at a given branch.
  2. Fitch–Sankoff algorithm to infer the placement of mutations on a given tree and on the variant list.

### Missing data and errors affect placement of SARS-CoV-2 genomes
  1. **Low genome coverage**: When we randomly masked between 0 and 50% of positions in samples to be placed by UShER, all measures of placement accuracy were negatively impacted. With 50% of all sites masked, only 41.9% of samples were assigned identical sister nodes as their true placement on the reference tree. Based on these observations, we recommend that the reference tree should ideally be maintained using only genomes with nearly complete sequences regardless of the tree inference method (for example, by filtering data obtained from the GISAID database using ‘complete’ and ‘high coverage’ tags).
  2. **Stochastic errors**: With 10 errors on average, placement is approximately 20% less likely to select the correct sister node; other distance metrics are similarly impacted (Fig. 2). Our results indicate that especially low-quality samples should be rigorously identified and excluded from analyses using UShER.
  3. **Systematic errors**: a single systematic error present in all 10 samples had a similar overall effect on placement accuracy as 50% missing data in error-free sequences. Systematic errors should be rigorously identified and removed before sample placements are performed. We refer readers to methods that we developed previously to detect and eliminate such errors.

### Quantifying uncertainty in sample placement
1. The number of equally parsimonious placements.
2. The minimum number of additional mutations required to accommodate a single sample placed on each branch of the reference tree, a measure that we call the BPS. (Only for single sample placement)

### UShER is congruous with standard methods on SARS-CoV-2 data
The authors measures the consistency of placement between more typical tree-building approaches (Fasttree) and the UShER placement algorithm.

## Useful methods
- *Fitch–Sankoff algorithm* to infer the placement of mutations on a given tree and on the variant list

- *Robinson–Foulds distance* to measure congruence with the correct tree. ([TreeCmp: Comparison of Trees in Polynomial Time](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3422086/))

- Detect and eliminate systematic errors: [Stability of SARS-CoV-2 phylogenies](https://pubmed.ncbi.nlm.nih.gov/33206635/), and [post](https://virological.org/t/issues-with-sars-cov-2-sequencing-data/473).

- A *tie-breaking strategy* was used when multiple node placements are equally parsimonious.

- Tool for *simulating genome evolution along a phylogeny*: [pyvolve](https://pubmed.ncbi.nlm.nih.gov/26397960/)

- [TreeShrink](https://pubmed.ncbi.nlm.nih.gov/29745847/) to remove sequences on very long branches.

- [goalign](https://github.com/evolbioinfo/goalign) to create 100 bootstrap alignments.

## Other notes
- Sequential placement of new samples using UShER is possible (multiple rounds of placements can be carried out over and over again). The authors state that the placements *could potentially be worse than a full de novo tree inference procedure. However, in practice, we have found UShER’s accuracy over iterated placements to be reasonably high.*

- The UShER family also have helper tools including [matUtils](https://usher-wiki.readthedocs.io/en/latest/matUtils.html) (for interacting with Mutation Annotated Tree (MAT)), [matOptimize](https://usher-wiki.readthedocs.io/en/latest/matOptimize.html) (for optimizing phylogenies using parsimony score), and [RIPPLES](https://usher-wiki.readthedocs.io/en/latest/ripples.html) (to detect recombination events in large mutation annotated tree (MAT) files).

- Personal perspective: Maybe considering different DNA substitution models for sample placements (especially when multiple node placements are equally parsimonious) can improve accuracy.


text:
# Reinforcement-Learning
Some basics are covered in this [note 1](https://github.com/Shauqi/Reinforcement-Learning/blob/main/Reinforcement_Learning_Note_1.pdf). Following algorithms are ordered based on the note 1. This note 1 is from stanford course cs229.

Tips on setting up OpenAI Gym, Pybullet, Mujoco Environment can be found in [Environment Setup](https://github.com/Shauqi/Reinforcement-Learning/tree/main/Environment_Setup) folder.

1. [Value Iteration Algorithm](https://github.com/Shauqi/Reinforcement-Learning/tree/main/1_value_iteration)
2. [Policy Iteration Algorithm](https://github.com/Shauqi/Reinforcement-Learning/tree/main/2_Policy_Iteration)
3. [Monte Carlo Learning](https://github.com/Shauqi/Reinforcement-Learning/tree/main/3_Monte_Carlo_Learning)
4. [Temporal Difference](https://github.com/Shauqi/Reinforcement-Learning/tree/main/3_Monte_Carlo_Learning)

repository: Shauqi/Reinforcement-Learning

repo_name: Shauqi/Reinforcement-Learning


text:
# Exercise 1

Goal: Change the text of the Button control from "Edit me" to "Hello World"

from ![](src.png) to ![](goal.png)

Steps:
1. Open the exercise in a new tab: [Exercise 1](http://jsbin.com/kupazaw/9/embed?html,output)
2. Edit the button definition on the left side of the screen and see the changes on the right side of the screen

Related OpenUI5 Documentation:
- https://openui5.hana.ondemand.com/#docs/api/symbols/sap.m.Button.html
- https://openui5.hana.ondemand.com/#docs/api/symbols/sap.m.ButtonType.html