Skip to content

Instantly share code, notes, and snippets.

View work_env_setup.md

環境構築

  • env
    • Dock
      • 右側に、デフォルト非表示
      • 不要なものは Dock から削除
    • ホットコーナー
      • 左下カーソルでスリープ
    • スポットライト
      • ショートカット設定(⌘+option)
View my-chrome-extensions.md

Chrome 拡張一覧

dev

View install-vscode-extensions.sh
#!/bin/bash
# execute command
# -------------------
# curl -s https://gist.githubusercontent.com/busonx/f0e9644c7685097fe8916546f1a95f5d/raw/78e86b7226e02c627ae937a3ff4a6d85f9092cbb/install-centos7.x-vscode-extensions.sh | /bin/bash
# Ref: https://qiita.com/takeru08ma/items/43705af9fa864cf3bc18
# Visual Studio Code :: Package list
pkglist=(
View unhandled-rejection-due-to-callback.js
const throwError = () => { throw new Error('foo') }
const delayFunc = async () => {
setTimeout(async () => {
try {
await throwError()
} catch(e) {
// This won't be captured by main function
throw e
}
@chuck0523
chuck0523 / wider-modal-for-akamai-property-manager-modal.user.js
Last active Aug 15, 2019
UserScript for Tempermonkey to make modal wider at PropertyManager page
View wider-modal-for-akamai-property-manager-modal.user.js
// ==UserScript==
// @name Wider Modal - https://control.akamai.com/apps/property-manager/
// @namespace https://gist.github.com/chuck0523/bd260ee3d9933f741ec2d436aa706549
// @version 0.1
// @description Make modal wider for visibility
// @author chuck0523
// @match https://control.akamai.com/apps/property-manager/
// @grant none
// ==/UserScript==
@chuck0523
chuck0523 / for-loop-and-foreach.js
Last active Jul 18, 2019
for文とforEachにおける配列イテレーション差異
View for-loop-and-foreach.js
// 要素数10の配列を作成
const ary = new Array(10)
// 0番目と3番目の要素に文字列を設定
ary[0] = "foo"
ary[3] = "bar"
// 10回標準出力される
for (let i = 0; i < ary.length; i++) {
console.log(ary[i])
@chuck0523
chuck0523 / hatenablog-specific-word-counter.py
Last active Apr 15, 2018
任意のはてなブログを指定して、特定のワードの登場回数を調べる
View hatenablog-specific-word-counter.py
# coding: UTF-8
import urllib2
# "pip install beautifulsoup4" needs to be done
from bs4 import BeautifulSoup
# const
baseUrl = "ここにブログURL"
url = baseUrl + "/archive"
linkClass = "hatena-star-permalink"
entryClass = "entry-content"
View .zshrc
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/path/to/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="amuse"
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
View tableFiltersByMultipleConditions.js
// What is this: Util funciton which filters table data
// behavior:
// First apply multiple filters to each cells with AND_OR consideration
// Then AND_OR to columns as well
const { promisify } = require('util')
const request = promisify(require('request'))
// Can be dynamic state by Redux or something