teleren/devto huggingface dataset:
Removes the specified Collaborators from all repositories of the target Gituhub account.
Tags: github, git
Published: 2019-07-23 07:19:47

---
title: Removes the specified Collaborators from all repositories of the target Gituhub account.
published: true
description: Removes the specified Collaborators from all repositories of the target Gituhub account.
tags: Github,git
---

# Removes the specified Collaborators from all repositories of the target Gituhub account.

Please check this [Github](https://github.com/TakuyaTaniguchi/removeGitCollaborators) for details.


## Overall picture

```php:remove.php

 /**
     * GLOBAL
     * gitアカウントのメールアドレス
     * ログインパスワード
     * githubのアカウント名
     * 削除したいユーザー
     * を入力してください。
     */
    $Email = '';
    $PASS = '';
    $USER = '';
    $DELTE_USER = '';


    /**
     * 下記のAPIを実行し、api.jsonを作成してください。別途アクセストークンが必要です。
     * curl  "https://api.github.com/user/repos?access_token={token}&per_page=100&page=1&sort=created" > api.json
     */
    
    $url = './api.json';
    $json = file_get_contents($url);
    $json = mb_convert_encoding($json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN');
    $arr = json_decode($json,true);
    echo $count = count($arr);


    for ($i = 0; $i < $count; ++$i) {
        $repoName = $arr[$i]['name'];

        $cmd = "curl -X DELETE -u $Email:$PASS 'https://api.github.com/repos/$USER/$repoName/collaborators/$DELTE_USER'";
        echo $repoName;
        echo exec($cmd);
    }

```


First, please get APIKey from setting of Github management screen.
In that case, please check the repo of Select scopes. 

![](https://thepracticaldev.s3.amazonaws.com/i/xwhz8g7j1c95iwv1b4o2.png)  

After obtaining the access token, execute the following command to create api.json.

```
curl  "https://api.github.com/user/repos?access_token={token}&per_page=100&page=1&sort=created" > api.json
```

Specify a variable of remove.php.
 
```
$Email = 'hoge@gmail.com';
$PASS = 'password';
$USER = 'MyName';
$DELTE_USER = 'user_id';
```


Run remove.php
```
php remove.php
```


## Supplement

A maximum of 100 repositories can be acquired.
If you want to get more than 100 repositories, create additional json file separately as below,
Run PHP again specifying the file. 
```
curl  "https://api.github.com/user/repos?access_token={token}&per_page=100&page=2&sort=created" > api_2.json
```

remove.php
```
$url = './api_2.json';
```
Sort a List using LINQ
Tags: csharp, tutorial, beginners
Published: 2019-07-23 07:01:34

---
title: Sort a List using LINQ
published: true
tags: csharp,tutorial,beginners
series: C# Collections
cover_image: https://wellsb.com/csharp/wp-content/uploads/sites/2/2019/07/beginners-linq-sort-featured-min.png
---

The Language Integrated Query (LINQ) is a syntax that allows developers to sort, filter, and perform other aggregate operations on [collections in C#](https://dev.to/bradwellsb/getting-started-with-c-lists-on8). This tutorial is an introduction to LINQ.  You will learn how to query your data using two different styles of LINQ syntax.

In particular, this tutorial will introduce you to lambda expressions, and it will teach you how to sort a List&lt;T> of data using both the _query syntax_ and the _method syntax_.

[Source](https://wellsb.com/csharp/beginners/linq-syntax-sort-list/)
Teaser: Twitch Stream Series on Software Development
Tags: python, javascript, django, react
Published: 2019-07-23 06:59:32

---
title: Teaser: Twitch Stream Series on Software Development
published: true
description: Wanna learn Django and/or React? Join my streams in the fall to start learning.
tags: python, javascript, django, react
---

Do you have a basic understanding and skills to write Python and/or Javascript but would like to get more into how to build full-stack web applications? Don't worry, I'm here to help!

Starting in September 28th, I'll be doing Saturday streaming in Twitch to help you learn how to build a real web application with Django in the backend and React in the frontend. We'll build a single page app (SPA) for tracking personal expenses that communicates between React and Django using a REST API.

---

You can find my streams at [twitch.tv/hamatti](https://twitch.tv/hamatti) and my other upcoming programming videos in [Juhis Talks Tech Youtube channel](https://www.youtube.com/channel/UCFTR0aya8Bhzf3WIT4VwLeA). Clicking a Follow on both will make sure you won't miss the videos.

I've been teaching programming for years but now I want to take it into the next level and start learning filming and editing videos to share my knowledge to an even larger audience.
Machine Learning Complete Course: Go From Beginner To Expert
Tags: machinelearning, python, tutorial, beginners
Published: 2019-07-23 06:56:27

Learn Machine Learning from scratch and go from zero to hero in Machine Learning

Welcome to this course "Complete Machine Learning Course: Go From Beginner To Expert". In this course you will learn from scratch. We will assume that you are a complete beginner and by the end of the course you will be at advanced level. This course contain Real-World examples and Hands On practicals. We will guide you step by step so that you can understand better. This course will allow you to work on the Real-World as a professional.

What you'll learn
- Learn The Basics
- Learn Advanced Methods
- Step By Step Instructions So That You Can Go From Zero To Hero
- A Complete Tutorial Explaining Everything You Need To Know
- Real-World Examples With Hands On Tutorials
- Get Answers To Your Every Single Questions

{% youtube TF4BG1oeDfw %}
Use Font Awesome to Change The Mouse Cursor
Tags: css, webdev
Published: 2019-07-23 06:49:00

---
title: Use Font Awesome to Change The Mouse Cursor
published: true
description: Learn how to use the CSS property `cursor` to change the cursor appearance
tags: #css #webdev
---

#Introduction
As you probably know it, you can easily change the cursor's appearance thanks to the CSS property `cursor`. For example, `cursor: pointer` gives you the pointing hand. There are actually a lot of built-in values, as you can see on [csscursor.info](http://csscursor.info/). On that website, the most surprising cursor icon is the hand from Santa Claus. Yes, you can use a custom PNG or a SVG for the cursor!

#Syntax
To use your own icon, you have to provide two values. The first value is a path to your PNG or SVG file, using the url() syntax (like for the `background` property).
The second value is a fallback cursor appearance (among the built-in values) in case that your image file fails to load. I usually leave that fallback value to `auto`.

```css
#my-custom-icon {
  cursor: url(path/to/custom-cursor.svg), auto;
}
```

#Font Awesome
I find it very easy to use icons from Font Awesome for the cursor. You can download the icons as SVG and then all you need to do is to specify a height and a width (e.g. 20x20) and remove the unnecessary attributes:

```svg
<svg height="20" width="20" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" ><path  d="M502.63 217.06L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.77c-6.24-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.63l86.19 86.18-94.76 94.76c-37.49 37.49-37.49 98.26 0 135.75l117.19 117.19c18.75 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.88-28.12l221.57-221.57c12.49-12.5 12.49-32.76 0-45.26zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.61 58.6c12.49 12.49 32.75 12.49 45.24 0 12.49-12.49 12.49-32.75 0-45.24l-58.61-58.6 58.95-58.95 162.45 162.44-48.35 48.34z"></path></svg>

```

#Conclusion
You now have the complete Font Awesome library at your disposal to customize the cursor on your websites 😃
But please don't go crazy with it. Use this new power with the utmost moderation. Changing the cursor's appearance, especially to a custom icon, can really confuse your users. Your custom icon should always be specific to the context. In my case, I've changed it to a bucket when the user wants to fill an area on a canvas.

Remember also that users with a touch screen won't get that experience. In my canvas example, I had to find another way to indicate to those users that the bucket tool was selected.

As long as you keep your users in mind, you can be creative. For example, look at the link hover effect on this website: http://radiokdug.com/
React tldr; All React + TypeScript Cheatsheets
Tags: react, typescript, cheatsheets
Published: 2019-07-23 06:38:07

- The Basic Cheatsheet (/README.md) is focused on helping React devs just start using TS in React apps
- The Advanced Cheatsheet (/ADVANCED.md) helps show and explain advanced usage of generic types for people writing reusable type utilities/functions/render prop/higher order components and TS+React libraries.
- The Migrating Cheatsheet (/MIGRATING.md) helps collate advice for incrementally migrating large codebases from JS or Flow, from people who have done it.
- The HOC Cheatsheet (/HOC.md) specifically teaches people to write HOCs with examples.

Source: https://github.com/typescript-cheatsheets/react-typescript-cheatsheet?utm_source=reactdigest&utm_medium=web&utm_campaign=featured
10 Popular JavaScript Frameworks for 2019
Tags: javascript
Published: 2019-07-23 06:35:37

JavaScript is growing fast, it’s becoming more native, but most importantly — it’s becoming more stable. The number of web development frameworks that have come into the JavaScript sphere in the last years has really boomed. Many of the frameworks have already established huge communities around them, Angular, Meteor and React to name a few. In today’s post we will be taking a closer look at the currently most popular JavaScript frameworks. We strongly believe that these frameworks will be seeing a lot of growth, engagement, and exposure. Please share with us your personal experiences with the frameworks that you have used from our list as we would love to hear more input about the use cases for each individual framework.

When it comes to Web Development, JavaScript frameworks are one of the most favored platforms for developers & businesses in today’s time. Possibly, you have had a chance to experiment with one or two of the popular JavaScript Frameworks too. However, somewhere in your mind, you are still a little unsure about the best one to devote yourself to mastering or suggest your developer to opt for your next web development project.

This is quite obvious. JavaScript is moving at a breakneck pace and there is constant pressure to add new skills to your repository. In order to do that, knowing and understanding more of the top JavaScript Frameworks in today’s time is necessary. After thorough voting by 300+ developers at Simpliv, we shortlisted a few of them and here they are:
10 Popular JavaScript Frameworks for 2019

1. Angular

One of the most powerful, efficient, and open-source JavaScript frameworks is Angular. This framework is operated by the Google and is basically implemented to use for developing Single Page Application (SPA). It extends the HTML into the application and interprets the attributes in order to perform data binding.

Click here to continue reading: https://simpliv.wordpress.com/2019/07/23/10-popular-javascript-frameworks-for-2019/
Real-Time Feature Flags Using React Hooks
Tags: showdev, react, javascript, devops
Published: 2019-07-23 06:02:48

Are you building a feature which is not ready for prime time yet? But still want to show it to a select group of users? Do you want to skip the terrible thing which is called a staging environment? Look no more!

You are not alone. More and more teams are moving away from their staging environment to just simply use feature flags to control for which users a feature is enabled. **Staging only adds latency to your feature delivery.**

```jsx
const MyComponent = () => {
  const { isEnabled } = useBoolean(`my-feature`);

  if (isEnabled) {
    return (
      <div>
        // New component here
      </div>
    );
  }

  return (
    <div>
      // Old component stuff here
    </div>
  );
}
```

*This article is specifically about React, but we have different client libraries available. [Check out the list at Boolean](https://useboolean.com/).*

Getting started using feature flags is this easy. `npm i @ff00ff/boolean-react` and add the provider component in the root of your component tree and you're all set. You can sign up and create a [free account at Boolean](https://useboolean.com/).

```jsx
<BooleanProvider apiKey={process.env.BOOLEAN_API_KEY}>
  {/* Your component tree here */}
</BooleanProvider>
```

When the `BooleanProvider` mounts, the library starts a WebSocket connection to get the initial state of your features. And when you toggle your features in the Boolean dashboard, the changes are pushed over these WebSocket connections to all your users. Instantly.

## Advanced Targeting

There is more! Using Boolean, per feature, you can target specific users. This all happens without Boolean receiving a copy of the data you have on your users, because the rules are evaluated in the library. **We think this privacy-first approach is really important.**

```jsx
// Prop drilling is just an example here, you can also use a hook or any other way to get the user data in
const MyComponent = ({ user }) => {
  const { isEnabled } = useBoolean(`my-feature`, user.id, {
    // Add whatever attributes you want here
    plan: user.plan,
  });

  if (isEnabled) {
    return (
      <div>
        // New component here
      </div>
    );
  }

  return (
    <div>
      // Old component stuff here
    </div>
  );
}
```

Now, in the Boolean dashboard, you can use the user's `plan` attribute to enable a feature based on the plan they have. You can read more on the library on [the Boolean's React page](https://www.npmjs.com/package/@ff00ff/boolean-react).

I'm Martijn, founder of Boolean. If you have any questions just send me a ping. Are you ready to start using feature flags?
Do you need a local main branch?
Tags: git, github
Published: 2021-10-11 01:23:36

---
title: Do you need a local main branch?
date: 2019-07-23 06:00:00 UTC
canonical_url: https://madhead.me/posts/do-you-need-a-local-master-branch
tags: git, github
published: true
---

I noticed recently that I’ve (almost) never used a local `main` / `master` branch in Git. I only use it in simple one-off playground repos that I don’t plan to support and never in professional development or in “serious” pet-projects.

So, is it really required?

I’d say: it’s mostly useless to have a local `main` branch in Git. I’ve googled and found [this article](https://medium.com/@AlecBenzer/dont-checkout-master-locally-f5eabe1a98f0) by Alec Benzer and totally agree with what he said, but let me put it my own post.

Most probably your Git workflow forbids any pushes in the `main` branch on the server: it is either updated by pull requests or by a team member with special access permissions (“gatekeepers”). So, you rarely push your local `main` to its remote counterpart. Moreover, you’ll need to keep it in sync with the remote `main` or it will become stale. Extra work with no profit!

Every time you need a `main` use `origin/main` (assuming your remote is `origin`), just don’t forget to `fetch` the latest remote state.

E.g. starting a new branch from main:

``` bash
git checkout -b branch origin/main
```

Checking the difference between any branch and the latest `main`:

``` bash
git diff origin/main branch
```

Rebasing you branch on the latest `main`:

``` bash
git rebase origin/main branch
```

You can even checkout to the latest main without really checking out any branch:

``` bash
git checkout origin/main
```

You’ll appear in a detached `HEAD` state and won’t be able to commit. Some tools like [`gradle-release` plugin](https://github.com/researchgate/gradle-release) won’t work, but, hey!, do you really want to release from a local checkout?

Thanks for reading to the end. May your merges be conflictless!
Windows10のWSLでDockerとDockerComposeを動かすところまでメモ
Tags: docker, windows, wsl
Published: 2019-07-23 05:50:47

<blockquote class="twitter-tweet"><p lang="ja" dir="ltr">Windows 10 HomeでWSL越しにDocker for Ubuntu+Re:VIEWを使う（VM不要） <a href="https://t.co/xVObi8SHlh">https://t.co/xVObi8SHlh</a> <a href="https://twitter.com/hashtag/Qiita?src=hash&amp;ref_src=twsrc%5Etfw">#Qiita</a></p>&mdash; VA-11 Hall-A 東方算法騎士団(令和版) (@ElmElixir) <a href="https://twitter.com/ElmElixir/status/1153540841773813760?ref_src=twsrc%5Etfw">July 23, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

残念ながら上記では動かず（2019/07/20）

Dockerまでは動くがそれ以降のDocker-Compose下記のエラーで動かない

```
# sudo docker-compose up
Creating network "etl_default" with the default driver
ERROR: Failed to Setup IP tables: Unable to enable NAT rule:  (iptables failed: iptables --wait -t nat -I POSTROUTING -s {ip}/16 ! -o br-e9ec09beb9a3 -j MASQUERADE: iptables: No chain/target/match by that name.
 (exit status 1))
```
エラー文でぐぐってみると
dockerは動く、しかしネットワーク回りがダメってことらしいこれ解消できるのだろうけれどその道のプロでもないしなぁ…

参考：
<blockquote>
dockerをWindows10 HomeのWSL (Windows Subsystem for Linux)で動かしてみた https://www.scriptlife.jp/contents/programming/2018/07/09/docker-on-wsl/
</blockquote>
<blockquote>
WSLで「普通」にDockerが動くようになっていた話(しかしdocker-composeは動かない) - 無気力生活 (ノ ´ω｀)ノ ~゜ https://gdgd-shinoyu.hatenablog.com/entry/2018/07/10/032023
</blockquote>


<blockquote>
WindowsとDockerは食い合わせが悪い https://qiita.com/Hibikine_Kage/items/4b5c0f5f72e4d03b4797 #Qiita
</blockquote>

WSL2の記事もあったので帰ったらためしてみまする。
<blockquote>
wsl2でdocker-composeの風を感じてみる - 無気力生活 (ノ ´ω｀)ノ ~゜ https://gdgd-shinoyu.hatenablog.com/entry/2019/07/25/024013
</blockquote>
FizzBuzz
Tags: replit, node
Published: 2019-07-23 05:42:50

---
title: FizzBuzz
published: true
tags: replit, nodejs
---

program to display fizzBuzz in javaScript

if input...
Divisible by 3 then return => Fizz
Divisible by 5 then return => Buzz
divisible by both 3 and 5 then return => FizzBuzz
Not divisible by 3 or 5 then return => number
Input is not numbered then return => Not a Number


{% replit @arrbxr/fizzBuzz %}
Angular Tutorial - Learn Angular from Scratch
Tags: angular, javascript, webdev, tutorial
Published: 2019-07-23 04:33:44

This course is for beginners who are curious on how to get started with Angular. In this course you will learn how to download, install and play around with Angular. We teach you the main components of Angular, so that you can get up and running with it asap. You will learn now to start building applications with Angular.

Learning Angular can be a daunting experience that's why this course was created; to give you an easier learning experience with it.

What am I going to get from this course?
- You will learn the mayor fundamentals of Angular
- You will learn how to get up and running with Angular
- You will learn to create Applications using Angular 5 and beyond

What you'll learn
- You will learn the mayor fundamentals of Angular
- You will learn how to get up and running with Angular
- You will learn to create Applications using Angular 5 and beyond

{% youtube 8wzVixo4QfQ %}
A guide to becoming an iOS developer
Tags: ios, swift, beginners
Published: 2019-07-23 03:29:02

“How did you start iOS development?” I have been asked this question many times and I thought it would be beneficial to write list of things that helped me throughout my journey as an iOS developer. 

I think being a constant learner is important in any industry but it’s absolutely crucial in tech, however sometimes it is a brake to productivity. My first step to becoming an iOS developer was having an idea and the will to implement it. I would recommend starting your project instantly, even though you have very little idea of developing for iOS, you can start by looking up things that you actually need in your project, learn them and implement them. That way as your project gets bigger you will be challenged to learn more about design patterns, architecture, etc. I also believe surrounding yourself in an iOS developer community, listening to different podcasts, following other iOS developers in social media and generally being involved could be beneficial.

Below there is a list which helped me a lot (and still helping) to learn iOS development:

Youtube channels:
1. [Lets build that app](https://www.youtube.com/channel/UCuP2vJ6kRutQBfRmdcI92mA)
2. [Sean Allen] (https://www.youtube.com/channel/UCbTw29mcP12YlTt1EpUaVJw)
3. [Paul Hudson] (https://www.youtube.com/channel/UCmJi5RdDLgzvkl3Ly0DRMlQ)
4. [Brian Advent] (https://www.youtube.com/channel/UCysEngjfeIYapEER9K8aikw)

Websites:
1. [Swift by Sundell] (https://www.swiftbysundell.com)
2. [Hacking with Swift] (https://www.hackingwithswift.com)
3. [Use your loaf] (https://useyourloaf.com)
4. [NSHipster] (https://nshipster.com)

Podcasts:
1. [Swift by Sundell] (https://podcasts.apple.com/ca/podcast/swift-by-sundell/id1267161825)
2. [Swift Unwrapped] (https://podcasts.apple.com/ca/podcast/swift-unwrapped/id1209817203)
3. [Swift over coffee] (https://anchor.fm/s/572fc68/podcast/rss)

I am certain that there are so many other amazing sources that I am not aware of, please do not hesitate to mention them in the comments section.

Also you can find me on Twitter [@mori_ahk](https://twitter.com/mori_ahk)

Thanks for reading.
Bitcoin: A Peer-to-Peer Electronic Cash System
Tags: buidlhonduras, devconv, bitcoin
Published: 2019-07-23 02:23:31

---
title: Bitcoin: A Peer-to-Peer Electronic Cash System
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5k2qvurwxpob6jx0m826.png
description: Summary of the Bitcoin White paper
tags: buidlhonduras, devconV, bitcoin
---

##TL;DR
This is a summary of the Bitcoin White paper, You can read the full paper here: https://bitcoin.org/bitcoin.pdf

---

The Bitcoin White paper was published the 31 October of 2008 by Satoshi Nakamoto. No one knows the real identity of Satoshi Nakamoto.

Bitcoin was created to disrupt online transactions and internet commerce which used to require a trust-based model and relies on financial institutions to prevent double-spending. Relying on centralized organizations has severe problems such as censorship, chargebacks, and complexity that increase transaction costs.

Paying with cash solves the double-spending problem in the physical world, for the digital world it's needed a Blockchain. Bitcoin's blockchain uses hashes to create a connected data structure which saves the owner of a coin using the private key as proof of ownership. To be secure uses a peer to peer timestamp server that requires a generated computational proof, malicious actors would need to collectively control more CPU power than the rest of the actors. To change previous transactions is needed to use the same amount of CPU power to rewrite all previous transactions until the end of the chain making it almost impossible to hack the network. 

Depending on the size of the network the proof of work difficulty increases or reduces. 

There are a set of rules to run the network, the goal is to validate transactions in a block and add it to the chain by nodes, the longest chain will be always considered by the nodes and if two different chains are equally long a temporal branch will be created until one is longer. As incentive users earn new coins generated on each block and a transaction fee. Once a certain amount of coins are created **no** new coins will be created and the incentive will be the transaction fee.

In conclusion, Bitcoin is a cryptocurrency created by a set of technologies, it creates and stores value in an anonymous and trustless way. The technology behind it, the Blockchain can be used for different purposes including the creation of decentralized Apps, perfect for systems that need trust.