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
@yasuflatland-lf
yasuflatland-lf / 1_kubernetes_on_macOS.md
Created June 14, 2020 21:36 — forked from kevin-smets/1_kubernetes_on_macOS.md
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

@yasuflatland-lf
yasuflatland-lf / 0-vscode-extensions-backup.md
Last active July 31, 2024 07:05
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:

@yasuflatland-lf
yasuflatland-lf / ansible-pull sample cmd.sh
Last active August 31, 2022 09:16
ansible-pull sample
# Place local.yml at the same directory
ansible-pull -e 'ansible_python_interpreter=/usr/bin/python3' \
-U https://<Git Access Token here>:x-oauth-basic@github.com/<Your organization in Github name here>/<Your Github private repository name here> \
-d /tmp/<Your Github private repository name here> ./local.yml
@yasuflatland-lf
yasuflatland-lf / Liferay Initial files
Last active March 23, 2021 08:51
Macbook initial files
Macbook initial files
@yasuflatland-lf
yasuflatland-lf / Category Filter Widget Template
Last active February 25, 2021 09:06
LIferay Japan Resource Library
<button
aria-expanded="false"
aria-haspopup="true"
class="btn btn-primary dropdown-toggle ml-1 taglib-icon"
data-toggle="liferay-dropdown"
type="button"
>
<aui:icon image="caret-down" markupView="lexicon" />
Default
</button>
@yasuflatland-lf
yasuflatland-lf / firebase-admin-multi-apps-init-ES6.md
Created May 8, 2021 21:09 — forked from jofftiquez/firebase-admin-multi-apps-init-ES6.md
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';
@yasuflatland-lf
yasuflatland-lf / Web Content Structure
Created May 21, 2021 01:04 — forked from gabriel-lee/Web Content Structure
Custom templates for Search Results cards
{
"availableLanguageIds": [
"en_US"
],
"defaultLanguageId": "en_US",
"fields": [
{
"label": {
"en_US": "Title"
},
@yasuflatland-lf
yasuflatland-lf / movie_review_image_web_content_template.ftl
Last active June 1, 2021 07:53
Qiita Movie Review List Snippets
<#--
Web content templates are used to lay out the fields defined in a web
content structure.
Please use the left panel to quickly add commonly used variables.
Autocomplete is also available and can be invoked by typing "${".
-->
${DocumentsAndMedia2wx2.getData()}
@yasuflatland-lf
yasuflatland-lf / exec.rb
Last active October 7, 2021 02:14
Get rid of duplication from 2 files
input = []
File.foreach("input.txt"){|line|
input << line.chomp
}
output = []
File.foreach("output.txt"){|line|
output << line.chomp
}
// Remove duplicated entries in input from output
[#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]