Skip to content

Instantly share code, notes, and snippets.

View ogaty's full-sized avatar

Yuji Ogata ogaty

View GitHub Profile
@ogaty
ogaty / yum.md
Last active July 18, 2019 13:15
defference between yum and apt

update

yum update
apt apgrade

アップデート確認

yum list updated
apt list --upgradable
@ogaty
ogaty / mysql-user.md
Last active July 17, 2019 11:40
mysql postgresql

すぐ忘れるので

MySQL

ユーザー作成

create user 'john'@'localhost';

ユーザー作成+パスワード

create user 'john'@'localhost' identified by 'doe';

存在するユーザーにパスワード生成

@ogaty
ogaty / uwp.md
Last active December 4, 2018 00:26
uwp戻るボタン
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; ;
SystemNavigationManager.GetForCurrentView().BackRequested += (s, a) =>
{
    if (Frame.CanGoBack)
    {
        Frame.GoBack();
        a.Handled = true;
    }
};
@ogaty
ogaty / js-mix.md
Last active November 14, 2017 13:02
browserifyとかgulpとか

問題点

laravel-mixやlaravel-elixirは重すぎて低スペッククラウドだと非常に時間がかかる
ので対処したい
gulp + browserify/webpack + vue.js(外部component)   が目標
なんだけど実際やると半端じゃなくややこしくなってくるのでまとめる。

browserify単体

これは単純。

@ogaty
ogaty / promise.md
Last active February 7, 2020 10:19
Promise勉強

resolveを受けるまで待機する非同期処理って感じね
new Promiseではresolveかrejectを返す
resolveを受けると次のthenへ
rejectを受けるとcatchへ

Promise.resolve()
.then(function() {
    return new Promise(function(resolve, reject) {
 setTimeout(function() {
@ogaty
ogaty / linux.md
Last active June 14, 2019 14:13
linux terminal shortcut bash カーソル移動

win/Linuxの場合

alt+f、alt+bで単語単位の移動

win/mac/Linuxどれも

esc+f、esc+bで単語単位の移動
iTerm2ならOptionキーをEscにしよう

手前のスペースまで削除

ctrl + w
systems managerとかでやる場合はcmd+wと間違えないように

@ogaty
ogaty / serverspec.md
Last active December 22, 2018 06:53
serverspec
require 'spec_helper'

describe package('git') do
  it { should be_installed }
end

describe package('httpd') do
  it { should be_installed }
@ogaty
ogaty / curl.md
Last active November 3, 2018 01:35
curl
  • curl -A "USER_AGENT" http://www.example.com
  • curl -b cookie.txt(設定)
  • curl -c cookie.txt(保存)
  • curl -d data設定
  • curl -H request Header
  • curl -i header+HTML
  • curl -I headerのみ
  • curl -k ssl無視
  • curl -L redirect追従
  • curl -o ファイル保存
@ogaty
ogaty / mint.md
Last active September 20, 2019 15:27
Linux mint インストールメモ linuxmint

解像度

vmwareの場合は外観の設定のフォントから解像度を144くらいまでしよう

ネットワーク

2つインターフェースを設定
mateはNATとホストオンリーで
cinnamonはなんか不具合出た(なぜ違う)

git、ユーザー

このあたりは最初からある

@ogaty
ogaty / conky.conf
Last active June 3, 2018 01:08
conky
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details