Skip to content

Instantly share code, notes, and snippets.


Yohei Marion Okuyama skymarionsky

  • Lotus&Company Inc.
  • Tokyo, JPN
View GitHub Profile
skymarionsky /
Created Feb 4, 2019 — forked from lostandfound/
EC2のAmazon Linux で ec2-user を apache グループに追加し、/var/www ディレクトリに apache グループの所有権を与え、グループに書き込み権限を割り当てる
# EC2のAmazon Linux で ec2-user を apache グループに追加し、
# /var/www ディレクトリに apache グループの所有権を与え、グループに書き込み権限を割り当てます。
# source
ls -l /var/www
# ユーザー(この場合は ec2-user)を apache グループに追加します。
sudo usermod -a -G apache ec2-user
View git count today lines of code (all)
git log --since=midnight --remotes --branches --numstat --pretty="%H" | awk '(NF==3 && $3 !~ /\.meta$/ && $3 ~ /script/) {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
skymarionsky / 0_reuse_code.js
Created Aug 11, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
skymarionsky /
Last active Jan 7, 2016 — forked from hannu/gist:4604611
Filter your own commit messages from git log and group by day. (Modified from
AUTHOR=$(git config
DATE=$(date +%F)
git log --no-merges --format="%cd" --date=short --no-merges --author="$AUTHOR" --all | sort -u | while read DATE ; do
if [ $DATE != "" ]
echo [$DATE]
GIT_PAGER=cat git log --no-merges --format=" %s" --since="${DATE} 00:00:00" --until="${DATE} 23:59:59" --author="$AUTHOR" --all
View .bash_profile
if [ -f ~/.bashrc ] ; then
. ~/.bashrc
skymarionsky / bind_polyfill.js
Created May 8, 2014
View bind_polyfill.js
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
skymarionsky / FileRead.cpp
Last active Mar 30, 2019
read file and do something line by line with c++
View FileRead.cpp
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
int main(int argc, char* argv[])
ifstream file(argv[1]); // pass file name as argment
string linebuffer;
skymarionsky / .bashrc
Created Apr 15, 2014
for my windows pc Git Bash
View .bashrc
alias ll='ls -al --show-control-chars'
alias ls='ls --show-control-chars'
eval `ssh-agent`
ssh-add .ssh/id_rsa
skymarionsky / _autocomplete.php
Last active Jun 1, 2016 — forked from kenjis/_autocomplete.php
For FuelPHP, works on PHPStorm.
View _autocomplete.php
class Asset_Instance extends Fuel\Core\Asset_Instance {}
class Cache_Handler_Json extends Fuel\Core\Cache_Handler_Json {}
class Cache_Handler_Serialized extends Fuel\Core\Cache_Handler_Serialized {}
class Cache_Handler_String extends Fuel\Core\Cache_Handler_String {}
class Cache_Storage_Apc extends Fuel\Core\Cache_Storage_Apc {}
abstract class Cache_Storage_Driver extends Fuel\Core\Cache_Storage_Driver {}
class Cache_Storage_File extends Fuel\Core\Cache_Storage_File {}
class Cache_Storage_Memcached extends Fuel\Core\Cache_Storage_Memcached {}