Skip to content

Instantly share code, notes, and snippets.

View yasuflatland-lf's full-sized avatar
🛹
Skating

Yasuyuki Takeo yasuflatland-lf

🛹
Skating
View GitHub Profile
@ymmt2005
ymmt2005 / howto-tech-docs.md
Last active March 18, 2025 14:35
技術文書の書き方

技術文書の書き方

このメモは、私(@ymmt2005)が長年にわたってソフトウェアプロダクト開発に関わってきて 2022年現在こうしたほうが良いと考えているベストプラクティスです。

科学的な分析等に基づくわけではない経験則であるため、今後も随時見直すことがありますし、 ここに書いてあることが常に正しいわけでもあらゆるソフトウェア開発に適するわけでもありません。

しかしながら、実務経験が豊富で、モダンな技術スタックに明るいエンジニアの経験則は一定の 役に立つのではないかと考えて記します。

[#assign black_list = ["class", "request", "getreader", "getinputstream", "writer"] /]
[#macro dump key data]
[#if data?is_enumerable]
enumerable:<b>${key}</b>
[@printList data,[] /]
[#elseif data?is_hash_ex]
hash_ex:<b>${key}</b>
[@printHashEx data,[] /]
[#else]
@illvart
illvart / 0-vscode-extensions-backup.md
Last active September 28, 2024 13:22
VSCode - Visual Studio Code extensions backup

VSCode - Visual Studio Code extensions backup

If you are use Unix/Linux create a bash script with a loop. In this case I want to backup the extensions list and install again:

First create a list of the extensions:

$ code --list-extensions > extensions.txt

Create a bash script for example with the name vscode-extension-install.sh and input the following code:

@troyharvey
troyharvey / deployment.yml
Last active April 20, 2025 15:39
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@jofftiquez
jofftiquez / firebase-admin-multi-apps-init-ES6.md
Last active January 8, 2025 21:17
Firebase admin - how to initialise multiple applications in ES6 nodejs.

Firebase Admin Multi App Initialization - ES6

This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.

ES5 version

Using ES6

import 'firebase';
@xflr6
xflr6 / walk_gdrive.py
Last active July 27, 2024 18:38
Recursively traverse the directory tree of a Google Drive folder as variation of os.walk()
"""os.walk() variation with Google Drive API."""
import os
from apiclient.discovery import build # pip install google-api-python-client
FOLDER = 'application/vnd.google-apps.folder'
def get_credentials(scopes, *,
@ar-android
ar-android / Api.java
Created November 10, 2016 16:59
OkHttp With RxAndroid and RxJava
public static Observable<Response> getData() {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
final OkHttpClient client = new OkHttpClient();
final Request request = new Request.Builder()
.url("https://github.com/ar-android/panfic/raw/master/Panfic/gen/com/ocit/data.json")
.get()
.addHeader("cache-control", "no-cache")
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active March 16, 2025 22:37
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

<#if request.lifecycle == "RENDER_PHASE">
<#assign journal_content_util = staticUtil["com.liferay.portlet.journalcontent.util.JournalContentUtil"] />
<div class="lego-article ${article_class.data}" id="article-${.vars['reserved-article-id'].data}">
<#list section.siblings as cur_section>
<section class="block-container lego-section section-${cur_section_index + 1} ${cur_section.section_class.data}" ${cur_section.data}>
<#list cur_section.block.siblings as cur_block>
<div class="block block-${cur_block_index + 1} content-column lego-block w${cur_block.width.data} ${cur_block.block_class.data}" ${cur_block.data}>
<#list cur_block.element.siblings as cur_element>
<#assign cur_element_tag = cur_element.tag.data>