Skip to content

Instantly share code, notes, and snippets.

View yokodev's full-sized avatar

yokodev

View GitHub Profile
@yokodev
yokodev / keychron_linux.md
Created December 29, 2022 17:00 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

@yokodev
yokodev / Codium_ScrollingUpDown.txt
Last active October 23, 2020 18:56
Ctrl UP Down VSCodium
https://github.com/microsoft/vscode/issues/2091#issuecomment-346703719
Add this to the keyboard shortcut keys
{
"key": "ctrl+up",
"command": "editorScroll",
"when": "editorTextFocus",
"args":
{
"to": "up",
@yokodev
yokodev / setenv.sh
Created March 19, 2020 14:41 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@yokodev
yokodev / Ansible FirstStep howto
Last active November 29, 2019 22:51
Ansible First steps
1)Download and install ansible
*sudo apt install python-argcomplete
*sudo activate-global-python-argcomplete
*Login-logout
2)Create a local folder with ansible.cfg and hosts files
3)Modify ansible.cfg so the inventory now points to the new local folder instead of the default place (/ect/ansible/hosts)
[defaults]
inventory = /any/local/path/hosts
@yokodev
yokodev / .tmux.conf
Created November 19, 2019 19:38
TMUX and Nvim, Vim working O,K colors from themes working as they should
# this is .tmux.conf which is under .tmux/.tmux.conf
set -g default-terminal "xterm-256color" # this line has to be the first line in .tmux.conf or it will give a lot/ unexisting of trouble
@yokodev
yokodev / Mongo.md
Created August 2, 2019 22:37 — forked from jnewman12/Mongo.md
Data Modeling With Mongo

Data Modeling with MongoDB

mongo


Objectives

  • Understand model relationships in MongoDB
  • Understand One-to-Many relationships
@yokodev
yokodev / helm-install-gke
Last active October 12, 2018 09:01
This is how I was able to install helm for GKE
https://github.com/helm/helm/issues/3130#issuecomment-372931407
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
@yokodev
yokodev / create-react-app with docker multi-stage setup
Created August 16, 2018 14:11 — forked from dennisschneider/create-react-app with docker multi-stage setup
Dockerfile to deploy a create-react-app project to production
### STAGE 1: Build ###
FROM node:9.11.1 as build
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install --silent
RUN npm install react-scripts -g --silent
COPY . /usr/src/app
RUN npm run build
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
@yokodev
yokodev / redux-thunk-examples.js
Created October 21, 2017 04:19 — forked from markerikson/redux-thunk-examples.js
Redux-Thunk examples
// The classic AJAX call - dispatch before the request, and after it comes back
function myThunkActionCreator(someValue) {
return (dispatch, getState) => {
dispatch({type : "REQUEST_STARTED"});
myAjaxLib.post("/someEndpoint", {data : someValue})
.then(response => dispatch({type : "REQUEST_SUCCEEDED", payload : response})
.catch(error => dispatch({type : "REQUEST_FAILED", error : error});
};
}