Skip to content

Instantly share code, notes, and snippets.

View kenichi-shibata's full-sized avatar
🇯🇵
working

Kenichi Shibata kenichi-shibata

🇯🇵
working
View GitHub Profile
@kenichi-shibata
kenichi-shibata / InstallGuide.md
Created March 13, 2023 16:50 — forked from paill/InstallGuide.md
How to setup your Mac and Development Environment for OS-X Yosemite

Setting up your Mac

Geting an Admin Account

  • In order to install and configure your Mac, you need to be an Administrator on your computer. Either, contact Paul or Charlie, and they will create an account for you.

Installing of Software

Homebrew

@kenichi-shibata
kenichi-shibata / InstallGuide.md
Created March 13, 2023 16:50 — forked from paill/InstallGuide.md
How to setup your Mac and Development Environment for OS-X Yosemite

Setting up your Mac

Geting an Admin Account

  • In order to install and configure your Mac, you need to be an Administrator on your computer. Either, contact Paul or Charlie, and they will create an account for you.

Installing of Software

Homebrew

@kenichi-shibata
kenichi-shibata / oreilly-live-events.py
Created January 11, 2023 16:34 — forked from suhailpatel/oreilly-live-events.py
A CLI to interact with the O'Reilly Live Events site
#!/usr/bin/python3
import cmd, json, sys, traceback
from collections import defaultdict
from dataclasses import dataclass
from typing import List, Dict
import requests
# This is part of Suhail's talk on the Infrastructure and Ops Superstream
# track for O'Reilly
@kenichi-shibata
kenichi-shibata / blame-praise.py
Created October 18, 2022 12:35 — forked from amarao/blame-praise.py
Example of argparse with subparsers for python
#!/usr/bin/env python
import argparse
def main(command_line=None):
parser = argparse.ArgumentParser('Blame Praise app')
parser.add_argument(
'--debug',
action='store_true',
help='Print debug info'
@kenichi-shibata
kenichi-shibata / blame-praise.py
Created October 18, 2022 12:34 — forked from amarao/blame-praise.py
Example of argparse with subparsers for python
#!/usr/bin/env python
import argparse
def main(command_line=None):
parser = argparse.ArgumentParser('Blame Praise app')
parser.add_argument(
'--debug',
action='store_true',
help='Print debug info'
Recording Rule Example 1
================================
# Aggregating up requests per second that has a path label:
- record: instance_path:requests:rate5m
expr: rate(requests_total{job="myjob"}[5m])
- record: path:requests:rate5m
expr: sum without (instance)(instance_path:requests:rate5m{job="myjob"})
Recording Rule Example 2
@kenichi-shibata
kenichi-shibata / QEMU_ON_M1.md
Created January 26, 2022 09:31 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@kenichi-shibata
kenichi-shibata / checking_shasums.md
Created December 4, 2021 23:40 — forked from aklap/checking_shasums.md
How to check a file's shasum

##How to check file integrity with shasum


For verifying the integrity (but not authenticity of data, i.e., who authored it or the origin of the file) of a file, it is necessary to run a checksum function on the file which will output a value and compare it to a previously stored checksum value; if it matches we can be relatively confident that the file hasn't been tampered with or altered.

You might be asked to verify a file's sha1sum or sha2sum–all this means is calculating and verifying the cryptographic sha1 or sha2 hash value or digest included in the file.

###Various commands and methods for verifying shasum 1 or 2:


Organic:
In terminal run:

@kenichi-shibata
kenichi-shibata / better-nodejs-require-paths.md
Created November 22, 2021 10:49 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@kenichi-shibata
kenichi-shibata / README.md
Created November 21, 2021 21:57 — forked from PatrickLang/README.md
Setting up a multi-arch Kubernetes cluster on ODroid HC-1 and Pine64 Rock64