Skip to content

Instantly share code, notes, and snippets.

View rlam3's full-sized avatar

rlam3

View GitHub Profile
@rlam3
rlam3 / 📊 Weekly development breakdown
Last active March 12, 2024 00:35
📊 Weekly development breakdown
Python 17 hrs 41 mins █████████████▎░░░░░░░ 63.6%
YAML 3 hrs 39 mins ██▊░░░░░░░░░░░░░░░░░░ 13.2%
JavaScript 2 hrs 4 mins █▌░░░░░░░░░░░░░░░░░░░ 7.5%
Docker 1 hr 32 mins █▏░░░░░░░░░░░░░░░░░░░ 5.6%
JSON 42 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.5%
@rlam3
rlam3 / disable-cleanmymac.md
Created August 21, 2019 01:26
Mac disables "Setapp CleanMyMac-setapp.HealthMonitor" launchd services

sudo vim /private/var/db/launchd.db/com.apple.launchd/overrides.plist

Add the following code,as entries like:

<key>com.macpaw.CleanMyMac-setapp.HealthMonitor</key>
<dict>
<key>Disabled</key>
<true/>
@rlam3
rlam3 / zero_downtime_reindexing.py
Created January 29, 2016 22:12 — forked from ikeikeikeike/zero_downtime_reindexing.py
Elasticsearch Zero Downtime Reindexing using elasticsearch-dsl-py ref: https://www.elastic.co/blog/changing-mapping-with-zero-downtime
from datetime import datetime
from elasticsearch_dsl import (
DocType,
String,
Integer,
Float
)
def _suffix():
@rlam3
rlam3 / error001.js
Last active March 25, 2021 22:26
Unknown custom element: XXX did you register the component correctly? For recursive components, make sure to provide the "name" option.
console.error
[Vue warn]: Unknown custom element: <fa> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <PictureGallery>
<Index>
<Root>
at warn (node_modules/vue/dist/vue.common.dev.js:630:15)
@rlam3
rlam3 / nuxt.config.js
Last active December 3, 2020 04:41
Update your @nuxtjs/eslint-module from v2 to v3. nuxt.config.js
// Before
export default {
build: {
extend(config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
@rlam3
rlam3 / random_notion.py
Created June 4, 2020 02:56 — forked from tangjeff0/random_notion.py
get random notion notes to resurface your old ideas!
'''
author:
@tangjeff0
https://www.notion.so/tangjeff0/Public-Home-0e2636bd409b454ea64079ad8213491f
inspired by: https://praxis.fortelabs.co/p-a-r-a-iii-building-an-idea-generator-400347ef3bb6/
with help from: https://medium.com/@jamiealexandre/introducing-notion-py-an-unofficial-python-api-wrapper-for-notion-so-603700f92369
credits:
@jamiealexandre
@rlam3
rlam3 / pull_deploy_kubernetes.sh
Last active October 1, 2019 22:00
pull_deploy_kubernetes
$ kubectl get all # 1
╰─ kubectl get all
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 4d18h
$ kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10 # 2
╰─ kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
deployment.apps/hello-minikube created
$ kubectl get all # 3
@rlam3
rlam3 / RenderImage.vue
Last active July 27, 2019 12:33
Good vs Bad Way of Rendering image
<template>
<div>
<div>
<div v-for="(panel, index) in panelList" :key="index" class="panel">
<img class="" :src="panel.imagePath" /> /// Approach 1
<img class="" :src="require(panel.imagePath2)" /> /// Approach 2 WRONG!!! WEBPACK HATES YOU
<div class="">
<div class="">
{{ panel.title }}
</div>
@rlam3
rlam3 / blue_text.vue
Created July 25, 2019 14:30
vue with stylus
<template>
<div>
<p class="blue_text">{{ msg }}</p>
</div>
</template>
<script>
export default {
@rlam3
rlam3 / .git_ignore
Created January 12, 2019 22:33
2019_01_12_ios_swift_newbie_gotcha_medium_001
*.ipa
*.app.dSYM.zip