Skip to content

Instantly share code, notes, and snippets.

View letsspeak's full-sized avatar
🥺
finding remote jobs

Masatsugu Omiya letsspeak

🥺
finding remote jobs
View GitHub Profile
@letsspeak
letsspeak / Makefile
Created December 15, 2017 09:56
vs Redmine Textile Solution
# markdown files
MARKDOWNS = $(wildcard *.md)
# converted textiles
TEXTILES = $(patsubst %.md,%.textile,$(MARKDOWNS))
all: $(TEXTILES)
README.textile: README.md
@echo 'skipping README.textile conversion'
@letsspeak
letsspeak / MyClass.java
Last active December 11, 2017 07:48
Java Calendar add can beyond the XXX_OF boundary and Calendar date comparision test code
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class MyClass {
public static void main(String args[]) {
// Don be afraid that add(DAY_OF〜, value) makes no differences
@letsspeak
letsspeak / log.sh
Created October 23, 2017 06:58
fix gem trouble for high sierra
$ gem install aws-sdk
Fetching: jmespath-1.3.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
$ which ruby
/usr/bin/ruby
$ which gem
/usr/bin/gem
$ brew install rbenv ruby-build
$ rbenv install --list
@letsspeak
letsspeak / example.swift
Last active October 10, 2017 02:13
Swift optional is empty or nil
//
// check if array is empty or nil
//
class Example {
func check(_ array: [String]?) {
if (array ?? []).isEmpty == true {
print("array is empty or nil")
} else {
print("array is not empty or nil")
@letsspeak
letsspeak / result
Last active February 22, 2017 16:41
shukujitu
2016/01/01,元日
2016/01/11,成人の日
2016/02/11,建国記念の日
2016/03/20,春分の日
2016/04/29,昭和の日
2016/05/03,憲法記念日
2016/05/04,みどりの日
2016/05/05,こどもの日
2016/07/18,海の日
2016/08/11,山の日

React.js環境構築(未完)

VSCodeの導入

  • VSCodeをインストール
  • View Command Palette...(⇧⌘P or F1) -> Configure Language -> "ja" を "en" に変更保存して再起動すると英語化
  • View -> Extensions(⇧⌘X) -> @sort:installs vim でVim拡張導入

VSCodeの操作や設定など

@letsspeak
letsspeak / emon
Last active August 29, 2015 14:03
call accelerate#map('nv', 'e', '<C-u>', 'repeat("\<C-u>", v:count1)')
call accelerate#map('nv', 'e', '<C-d>', 'repeat("\<C-d>", v:count1)')
call accelerate#map('nv', '', 'j', 'gj')
call accelerate#map('nv', '', 'k', 'gk')
call accelerate#map('nv', '', 'h', 'h')
call accelerate#map('nv', 'e', 'l', 'foldclosed(line(".")) != -1 ? "zo" : "l"')
git branch | awk '/^*/{print $2}' | xargs -I% git push origin %
こんな感じでなんとか出来ないだろうか
@letsspeak
letsspeak / mysql.rake
Last active December 31, 2015 12:39
Ruby on Rails mysql backup rake task
# encoding: utf-8
namespace :mysql do
desc 'backup mysql database'
task :backup => :environment do
filename = "#{Rails.root}/config/database.yml"
config = YAML::load(File.open(filename))[Rails.env]
if config.nil?
@letsspeak
letsspeak / nicolive.rb
Created August 21, 2013 15:42
nicolive rtmpdump support script
require "net/http"
require "net/https"
require "uri"
require "rexml/document"
class NicoLiveException < StandardError; end
class NicoLive
attr_accessor :mail_tel, :password