Skip to content

Instantly share code, notes, and snippets.

@chuck0523
chuck0523 / work_env_setup.md
Last active December 8, 2023 02:11
備忘録

環境構築

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

Chrome 拡張一覧

dev

#!/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=(
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 August 15, 2019 01:02
UserScript for Tempermonkey to make modal wider at PropertyManager page
// ==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 July 18, 2019 10:50
for文とforEachにおける配列イテレーション差異
// 要素数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 April 15, 2018 06:53
任意のはてなブログを指定して、特定のワードの登場回数を調べる
# 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"
@chuck0523
chuck0523 / .zshrc
Last active September 22, 2023 05:13
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
plugins=(git)
alias st="git status"
alias br="git branch"
alias gl="git log"
alias ad="git add ."
alias cm="git commit -m "
// 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',
// 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