Skip to content

Instantly share code, notes, and snippets.

View zchee's full-sized avatar
😩
want to Go knowledge...

Koichi Shiraishi zchee

😩
want to Go knowledge...
View GitHub Profile
@zchee
zchee / disable.sh
Created December 5, 2019 19:03
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@zchee
zchee / google-web-starter-kit-gulpfile.md
Created July 23, 2014 14:49
Google Web Starter Kit gulpfile

use scrict

'use strict';

ストリクトモード(厳格モード)宣言。
開発者がよりエラーを探しやすくするよう、厳格なエラーチェックが行われるモード。

Include

@zchee
zchee / tmux-default-bind-key.tmux
Last active August 10, 2022 08:26
Tmux default bind-key
bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-q confirm-before kill-server
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
# Commennt out caused by Gist syntax error
@zchee
zchee / nvram.c
Last active May 11, 2022 04:39
nvram list from xnu-8020.101.4 (`rg PE_parse_boot_ --sort=path --line-number --no-multiline --no-heading`)
bsd/crypto/entropy/entropy_sysctl.c:134: if (__improbable(PE_parse_boot_argn(ENTROPY_ANALYSIS_BOOTARG, &sample_count, sizeof(sample_count)))) {
bsd/dev/dtrace/dtrace.c:19237: if (!PE_parse_boot_argn("dtrace_kernel_symbol_mode", &dtrace_kernel_symbol_mode, sizeof (dtrace_kernel_symbol_mode))) {
bsd/dev/dtrace/dtrace.c:19348: if (!PE_parse_boot_argn("dtrace_dof_mode", &dtrace_dof_mode, sizeof (dtrace_dof_mode))) {
bsd/dev/dtrace/dtrace.c:19412: PE_parse_boot_argn("keepsyms", &keepsyms, sizeof(keepsyms));
bsd/dev/dtrace/fbt_blacklist.c:395: PE_parse_boot_argn("IgnoreFBTBlacklist", &ignore_fbt_blacklist, sizeof(ignore_fbt_blacklist));
bsd/dev/mem.c:89:#include <pexpert/pexpert.h> /* for PE_parse_boot_argn */
bsd/dev/mem.c:272: PE_parse_boot_argn("kmem", &kmem, sizeof(kmem))) {
bsd/dev/unix_startup.c:286: (void) PE_parse_boot_argn("ncl", &ncl, sizeof(ncl));
bsd/dev/unix_startup.c:287: (void) PE_parse_boot_argn("mbuf_pool", &mbuf_pool, sizeof(mbuf_pool));
bsd/kern/bsd_init.c:442: if (PE_parse_boot_argn("rd"
@zchee
zchee / build-llvm.bash
Last active November 28, 2021 10:37
Build llvm for OS X
#!/bin/bash
set -e
# Building LLVM on OSX CMake setup script
#
# Required:
# - clang by Xcode6 or later
# - cmake
# - ninja
#
@zchee
zchee / !!!how-to-setup-mac.md
Last active September 15, 2021 21:39
How to setup My Mac

How to Setup Mac

  • Check Mac Deafult install
  • homebrew ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  • Check homebrew default install
  • sudo vi /etc/shells write /bin/zsh
  • chpass -s /bin/zsh
  • Check chpass
  • npm install -g jshint
  • sudo gem install sass(gulp rubySass)
@zchee
zchee / cvimrc.vim
Last active August 31, 2021 12:52
vimrc for cVim
set smoothscroll
set autoupdategist
map .t :tabnew chrome://newtab<CR>
let configpath = '/path/to/your/.cvimrc'
set localconfig " Update settings via a local file (and the `:source` command) rather"
@zchee
zchee / .README.md
Last active August 17, 2021 11:38 — forked from tarruda/.README.md
Tmux/Vim integration

Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.

Features:

  • Transparently move between tmux panes and vim windows
  • Using the shell, open files in one vim instance per project or directory
  • Fully integrated copy/paste between tmux, vim and x11 using simple keybinds(need to install the xclip program)
  • Easily send text to any tmux pane without breaking your edit workflow(needs slimux

'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist

@zchee
zchee / download_macos_and_create_install_disk.sh
Created June 13, 2021 15:39 — forked from niw/download_macos_and_create_install_disk.sh
A script to download macOS install image and create an install disk image
#!/usr/bin/env bash
set -e
VOLUME_PATH=/Volumes/installer
while getopts ":d:h" opts; do
case $opts in
d)
VOLUME_PATH=$OPTARG
;;