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
@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 / 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 / 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
.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 / 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>
```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
❯ npm cache clean; and rm -rf node_module 

❯ yarn
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
warning gulp-sass-bulk-import > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp-csscomb > csscomb > csscomb-core > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
@sotayamashita
sotayamashita / nginxproxy.md
Created November 4, 2016 03:13 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@sotayamashita
sotayamashita / emojis.json
Created December 18, 2017 10:59 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘§", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "πŸ‘©β€πŸ‘©β€πŸ‘¦β€πŸ‘¦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘§", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦", "name": "family_children", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "πŸ‘¨β€πŸ‘©β€πŸ‘¦β€πŸ‘¦", "name": "family_two_biys", "shortname": "", "unicode": "", "html": "&#128104;&zw