Skip to content

Instantly share code, notes, and snippets.

View sotayamashita's full-sized avatar
💭
May be slow to respond

Sam Yamashita sotayamashita

💭
May be slow to respond
View GitHub Profile
```bash
sota at Sotas-MacBook-Pro in ~/Documents/workspace/dotgames-server on feature/show-campagin-spot [?]
❯ npm cache clean; and rm -rf node_module 20:07
sota at Sotas-MacBook-Pro in ~/Documents/workspace/dotgames-server on feature/show-campagin-spot [?]
❯ yarn 7s 122ms
yarn install v0.15.1
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning gulp-environments > gulp-if > gulp-match > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
@sotayamashita
sotayamashita / README.md
Last active August 5, 2016 06:31
Validate that jQuery works in android 4.1 ~ 4.3

How to validate

Use Genymotion to emulate specific Android version and access localhost from it.

index.html:

<!-- 3.x -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
.hll { background-color: #ffffcc }
.c { color: #408080; font-style: italic } /* Comment */
.err { border: 1px solid #FF0000 } /* Error */
.k { color: #008000; font-weight: bold } /* Keyword */
.o { color: #666666 } /* Operator */
.ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.cm { color: #408080; font-style: italic } /* Comment.Multiline */
.cp { color: #BC7A00 } /* Comment.Preproc */
.cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.c1 { color: #408080; font-style: italic } /* Comment.Single */
@sotayamashita
sotayamashita / clean.fish
Last active May 26, 2016 08:41
Uninstall globally installed packages
# For fish shell
# it helps you win at npm
function clean -d "Clean npm global modules"
# ~/.config/fnm 下は例外
end
@sotayamashita
sotayamashita / README.md
Last active May 8, 2016 07:39
Question about ECSS

Question

I understand why ECSS make CSS be isolated but I have a question. Here is two modal components and I cannnot same components. There are buttons which rules are same in each component. According to ECSS I should write same code but I think it is redundant. what would you do in this situation ? Thaks in advance. 😄

Structure

components           # Presentational Components
.
├── foo-modal
@sotayamashita
sotayamashita / hide_cursor.php
Created April 29, 2016 12:09 — forked from drm/hide_cursor.php
Hide the cursor in a PHP script with ANSI escape code
<?php
function hide_cursor($stream = STDOUT) {
fprintf($stream, "\033[?25l"); // hide cursor
register_shutdown_function(function() use($stream) {
fprintf($stream, "\033[?25h"); //show cursor
});
}
@sotayamashita
sotayamashita / auto-deploy.md
Created April 26, 2016 08:43 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

* http://stackoverflow.com/questions/3258243/check-if-pull-needed-in-git
* https://git-scm.com/docs/git-pull
@sotayamashita
sotayamashita / README.md
Last active March 20, 2016 06:47
つれづれなるまゝに CSS

多くの人は CSS を書く際に Sassや Less、PostCSS などのプリプロセッサを使用して書いていると思う。そしてそのような場合 main となるファイルは @import を使った以下のようになると思う:

@import object/button.css
...

@import component/button.css
...
@sotayamashita
sotayamashita / README.md
Last active April 10, 2016 11:10
📝 Be a great README tips

Great Readme

📝 Be a great README tips

Badge

https://img.shields.io/badge/<left side>-<right side>-<color>.svg?style=<plastic|flat|flat-square>