<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rin</title>
    <description>The latest articles on DEV Community by Rin (@rinstarskykujat).</description>
    <link>https://dev.to/rinstarskykujat</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F111744%2F596fbc95-95c7-4372-8ba6-4523cf4cca7f.jpg</url>
      <title>DEV Community: Rin</title>
      <link>https://dev.to/rinstarskykujat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rinstarskykujat"/>
    <language>en</language>
    <item>
      <title>Removes the specified Collaborators from all repositories of the target Gituhub account.</title>
      <dc:creator>Rin</dc:creator>
      <pubDate>Tue, 23 Jul 2019 07:19:47 +0000</pubDate>
      <link>https://dev.to/rinstarskykujat/removes-the-specified-collaborators-from-all-repositories-of-the-target-gituhub-account-mkm</link>
      <guid>https://dev.to/rinstarskykujat/removes-the-specified-collaborators-from-all-repositories-of-the-target-gituhub-account-mkm</guid>
      <description>&lt;h1&gt;
  
  
  Removes the specified Collaborators from all repositories of the target Gituhub account.
&lt;/h1&gt;

&lt;p&gt;Please check this &lt;a href="https://github.com/TakuyaTaniguchi/removeGitCollaborators" rel="noopener noreferrer"&gt;Github&lt;/a&gt; for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overall picture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 /**
     * GLOBAL
     * gitアカウントのメールアドレス
     * ログインパスワード
     * githubのアカウント名
     * 削除したいユーザー
     * を入力してください。
     */
    $Email = '';
    $PASS = '';
    $USER = '';
    $DELTE_USER = '';


    /**
     * 下記のAPIを実行し、api.jsonを作成してください。別途アクセストークンが必要です。
     * curl  "https://api.github.com/user/repos?access_token={token}&amp;amp;per_page=100&amp;amp;page=1&amp;amp;sort=created" &amp;gt; 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 &amp;lt; $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);
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, please get APIKey from setting of Github management screen.&lt;br&gt;
In that case, please check the repo of Select scopes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxwhz8g7j1c95iwv1b4o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxwhz8g7j1c95iwv1b4o2.png"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;After obtaining the access token, execute the following command to create api.json.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl  "https://api.github.com/user/repos?access_token={token}&amp;amp;per_page=100&amp;amp;page=1&amp;amp;sort=created" &amp;gt; api.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Specify a variable of remove.php.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$Email = 'hoge@gmail.com';
$PASS = 'password';
$USER = 'MyName';
$DELTE_USER = 'user_id';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run remove.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php remove.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Supplement
&lt;/h2&gt;

&lt;p&gt;A maximum of 100 repositories can be acquired.&lt;br&gt;
If you want to get more than 100 repositories, create additional json file separately as below,&lt;br&gt;
Run PHP again specifying the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl  "https://api.github.com/user/repos?access_token={token}&amp;amp;per_page=100&amp;amp;page=2&amp;amp;sort=created" &amp;gt; api_2.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;remove.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$url = './api_2.json';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>Do you Know how to { content: attr({data-attribute}); } ?</title>
      <dc:creator>Rin</dc:creator>
      <pubDate>Sun, 25 Nov 2018 06:59:45 +0000</pubDate>
      <link>https://dev.to/rinstarskykujat/do-you-know-how-to--content-attrdata-attribute---1eke</link>
      <guid>https://dev.to/rinstarskykujat/do-you-know-how-to--content-attrdata-attribute---1eke</guid>
      <description>&lt;p&gt;We can pass the deta　　to el::before,after{ content:'';}&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;div class="button"&amp;gt;
        &amp;lt;span data-attribute="HOME"&amp;gt;HOME&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .button{
        span::before {
            content: attr(data-attribute);
            }
        }
    }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It's bery easy!!!&lt;/p&gt;

&lt;p&gt;I created a simple animation using this mechanism.&lt;/p&gt;

&lt;p&gt;Thanks！！！！&lt;/p&gt;

&lt;p class="codepen"&gt;See the Pen &lt;a href="https://codepen.io/Rin_T_T/pen/WYJVpd/"&gt;content data-attribute&lt;/a&gt; by Rin_T_T (&lt;a href="https://codepen.io/Rin_T_T"&gt;@Rin_T_T&lt;/a&gt;) on &lt;a href="https://codepen.io"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Set up your own endpoint using the WP REST API.</title>
      <dc:creator>Rin</dc:creator>
      <pubDate>Sat, 24 Nov 2018 08:41:13 +0000</pubDate>
      <link>https://dev.to/rinstarskykujat/set-up-your-own-endpoint-using-the-wp-rest-api-3oob</link>
      <guid>https://dev.to/rinstarskykujat/set-up-your-own-endpoint-using-the-wp-rest-api-3oob</guid>
      <description>&lt;h1&gt;
  
  
  Set up your own endpoint using the WP REST API.
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Reference material
&lt;/h3&gt;

&lt;p&gt;WP REST API Official Document&lt;br&gt;
&lt;a href="https://www.sofplant.com/blog/tech/wp-rest-api-tips/" rel="noopener noreferrer"&gt;https://www.sofplant.com/blog/tech/wp-rest-api-tips/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From WordPress 4.7 onwards, we set up our own endpoint using [WP REST API] which became available as standard, and acquire and display data in cross domain.&lt;/p&gt;

&lt;p&gt;Wordpress site hogehoge.jp&lt;/p&gt;

&lt;p&gt;Assume that the site that receives and displays data is fugafuga.jp.&lt;/p&gt;

&lt;p&gt;hogehoge.jp&lt;/p&gt;

&lt;p&gt;Please describe it in functions.php.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
//wordpressに用意されているアクションフックで独自APIを作成します。

add_action('rest_api_init', function() {
    register_rest_route( 'wp/v2', '/org_api', array(
        'methods' =&amp;gt; 'GET',
        'callback' =&amp;gt; 'org_api',
    ));
});
function org_api( ) {

    $contents = array();//return用の配列を準備
    $myQuery = new WP_Query();//取得したいデータを設定
    $param = array(
        'post_type' =&amp;gt; 'blog',
        'posts_per_page' =&amp;gt; 3,
        'order' =&amp;gt; 'DESC'
    );
    $myQuery-&amp;gt;query($param);
     if($myQuery-&amp;gt;have_posts()):
         while ( $myQuery-&amp;gt;have_posts() ) : $myQuery-&amp;gt;the_post();
                $ID = get_the_ID();
                $title = get_the_title();
                array_push($contents, array(
                    "title" =&amp;gt; $title,
                    "id" =&amp;gt; $ID
                ));
         endwhile;
     endif;
     return $contents;// WP REST APIを利用するときはjsonで返ってくる様に設定されているので、json_encodeは必要ありません。
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please visit &lt;a href="http://hogehoge.jp/wp-json/wp/v2/org_api" rel="noopener noreferrer"&gt;http://hogehoge.jp/wp-json/wp/v2/org_api&lt;/a&gt; and check that json will come back.&lt;/p&gt;

&lt;p&gt;If an error occurs at this point, there may be syntax errors on the php side.&lt;/p&gt;

&lt;p&gt;Receive data.&lt;br&gt;
When using in cross domain, specify jsonp as dataType.&lt;br&gt;
fugafuga.jp&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p id="view_area"&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
    $(function(){
            $.ajax({
            type: 'GET',
            url: 'http://hogehoge.jp/wp-json/wp/v2/org_api?_jsonp=callback',//コールバック関数名を指定する。 
            dataType: 'jsonp',
            jsonpCallback: 'callback',//コールバック関数名を指定する。
            success: function (jsonp) {
                    $(jsonp).each(function(index,el){
                    let id = (jsonp[index]['id']);
                    let title = (jsonp[index]['title']);
                        $('#view_area').append(
                        '&amp;lt;p&amp;gt;' + id + '&amp;lt;/p&amp;gt;'
                         + '&amp;lt;p&amp;gt;' + title  + '&amp;lt;/p&amp;gt;'
                        );
                });
            }
        });
    });
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I think whether data display is possible with the above.&lt;br&gt;
Processing etc. when data could not be acquired are omitted.&lt;br&gt;
By using your own endpoint, data that is difficult to acquire a bit with the standard API, (custom posting etc.)&lt;br&gt;
I think that it is possible to obtain flexible data by passing a favorite parameter to the request url and using it on the php side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data : {
    'param' : 'key_word'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&amp;lt;?php
//wordpressに用意されているアクションフックで独自APIを取得します。

add_action('rest_api_init', function() {
    register_rest_route( 'wp/v2', '/org_api', array(
        'methods' =&amp;gt; 'GET',
        'callback' =&amp;gt; 'org_api',
    ));
});
function org_api( ) {
$param = $_GET['param'];
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>api</category>
      <category>rest</category>
    </item>
    <item>
      <title>Roll over text CSS Animation</title>
      <dc:creator>Rin</dc:creator>
      <pubDate>Sat, 24 Nov 2018 08:31:05 +0000</pubDate>
      <link>https://dev.to/rinstarskykujat/roll-over-text-css-animation-51bj</link>
      <guid>https://dev.to/rinstarskykujat/roll-over-text-css-animation-51bj</guid>
      <description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;I created [Roll over text ] with CSS &lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/Rin_T_T/details/GwMWQV"&gt;https://codepen.io/Rin_T_T/details/GwMWQV&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I liked CSS Animation ! &lt;/p&gt;

&lt;p&gt;please tell me interesting css POST ! &lt;/p&gt;

&lt;p&gt;Thanks Good bye !!&lt;/p&gt;

</description>
      <category>css</category>
      <category>animation</category>
    </item>
    <item>
      <title> FLOCSS CSS_design</title>
      <dc:creator>Rin</dc:creator>
      <pubDate>Sun, 04 Nov 2018 06:30:45 +0000</pubDate>
      <link>https://dev.to/rinstarskykujat/-flocss-cssdesign-427m</link>
      <guid>https://dev.to/rinstarskykujat/-flocss-cssdesign-427m</guid>
      <description>&lt;p&gt;Hellow! I have been an engineer for one year.&lt;/p&gt;

&lt;p&gt;Overview&lt;br&gt;
Since I made LP with FLOCSS, I describe my own way of making and its impressions.&lt;br&gt;
(&lt;a href="http://rin-develop.jeez.jp/flocss/"&gt;There is a sample site&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;About FLOCSS&lt;br&gt;
Please see the repository below for details.&lt;br&gt;
&lt;a href="https://github.com/hiloki/flocss/blob/master/README_eng.md"&gt;https://github.com/hiloki/flocss/blob/master/README_eng.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Advocate&lt;br&gt;
&lt;a href="https://twitter.com/hiloki"&gt;https://twitter.com/hiloki&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more detailed usage etc. please refer to this article.(JP_only)&lt;br&gt;
&lt;a href="https://qiita.com/sueshin/items/dcbaf3d8a0adb6b087db"&gt;https://qiita.com/sueshin/items/dcbaf3d8a0adb6b087db&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My current development environment&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;base
    _reset.scss
    _setting.scss
component
    I will add a component system scss file here.
fonts
    Font type file
helper
    mixin etc.
inc
    Import the part for each directory.
    _component.scss
    _layout.scss
    _page.scss
layout
    Layout system scss file is added here.
page
    Scss file in page units
style.scss
    Import whole file
vendor
    Dedicated directory such as external API
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;New layout created for FLOCSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;base
    No Change
fonts
    No Change
helper
    No Change
inc
    No Change
object
    layout　 l-Prefix scss file
    component　c-Prefix scss file
    project p-Prefix scss file
    utility u-Prefix scss file
page
style.scss
vendor
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;It was often a problem that HTML and CSS easily collapsed.&lt;br&gt;
Although it can not completely prevent the collapse, attempts to prevent even a little by bringing in design rules are CSS design rules such as BEM, SMACSS, and FLOCSS introduced this time.&lt;br&gt;
I myself have a short engineering experience, but I am already aware of the importance of design rules.&lt;/p&gt;

&lt;p&gt;I think that you can understand if you can see "current my development environment"&lt;br&gt;
When increasing the basic CSS parts, add it to the [component] directory.&lt;br&gt;
There is no prefix, etc., the lead engineer will describe freely.&lt;br&gt;
In the current workplace, there are at most two engineers at all times, so there is no particular problem with this design method, so rather than deciding too detailed design rules, anyone can easily participate in the construction I am doing it.&lt;/p&gt;

&lt;p&gt;Then why, when I say that I introduced FLOCSS, if you continue to increase the number of files in the above component, the file will be approximately 70 to 100 files in the component directory.&lt;br&gt;
If it is this number, it is not difficult to follow the file yet. However, if you become a larger site in the future, there is concern that files will continue to increase without order,&lt;br&gt;
Also, when overwriting between components occurred, it was necessary to overwrite the component file in the component file, making tracking of the class name difficult.&lt;/p&gt;

&lt;p&gt;When you look at the advice readme, FLOCSS recognizes the availability by the development site to some extent while having basic rules.&lt;br&gt;
In my case always&lt;br&gt;
layout&lt;br&gt;
project&lt;br&gt;
component&lt;br&gt;
The rule order is the order of description.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Basic pattern

&amp;lt;div class="l-layout"&amp;gt;
    &amp;lt;div class="p-project"&amp;gt;
        &amp;lt;span class="c-component"&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;


c-component When overwriting


&amp;lt;div class="l-layout"&amp;gt;
    &amp;lt;div class="p-project"&amp;gt;
        &amp;lt;span class="p-project_component c-component"&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

When attaching a modifier to c-component

&amp;lt;div class="l-layout"&amp;gt;
    &amp;lt;div class="p-project"&amp;gt;
        &amp;lt;span class="c-component -is-red"&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  merit and demerit
&lt;/h1&gt;

&lt;p&gt;merit&lt;br&gt;
Layout&lt;br&gt;
Project&lt;br&gt;
Component&lt;br&gt;
Since it protects the hierarchy of components, components such as components are not complicated.&lt;br&gt;
By vigorously making it a part of the project, it became easier for the resultant fit.&lt;br&gt;
Easy to find files&lt;br&gt;
With light tied it makes it easier to write CSS.&lt;/p&gt;

&lt;p&gt;Demerit&lt;br&gt;
When developing with multiple people, some explanation is necessary for those who participate in development later&lt;br&gt;
Because there are rules, it collapses if there is no common recognition.&lt;br&gt;
Ultimately the separation of Component and Project ends up becoming individual's discretion.&lt;br&gt;
(I feel that any design philosophy can not be avoided.)&lt;/p&gt;

&lt;h1&gt;
  
  
  Sample site
&lt;/h1&gt;

&lt;p&gt;Up to this point it was an explanation of a simple self development environment, but when it was introduced for the first time,&lt;br&gt;
This became project? Component ?, and it got dreaded quite a bit.&lt;br&gt;
Now the introduction results are several, and although it can be made into rules to some extent in myself, I think that there are a lot of confusion at the beginning at first.&lt;br&gt;
So I will publish the test site that I assumed LP to this URL.&lt;/p&gt;

&lt;p&gt;caution !!!&lt;br&gt;
Because it is diverted from actually published site, the element which originally existed is removed, unnecessary property is applied.&lt;br&gt;
I think that if you can reference the granularity of the class name and the granularity of the project and the component rather than the design itself.&lt;br&gt;
I think that it will be added even if even a little to FLOCSS trying.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rin-develop.jeez.jp/flocss/"&gt;http://rin-develop.jeez.jp/flocss/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FLOCSS base_static github&lt;br&gt;
&lt;a href="https://github.com/TakuyaTaniguchi/static_develop"&gt;https://github.com/TakuyaTaniguchi/static_develop&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>scss</category>
    </item>
  </channel>
</rss>
