Skip to content

Instantly share code, notes, and snippets.

View jukbot's full-sized avatar
🏠
Working from home

Juk - a search builder jukbot

🏠
Working from home
  • CalCal
  • Bangkok, Thailand
  • X @jukbot
View GitHub Profile
@jukbot
jukbot / MaterialButtonGroup.kt
Created September 12, 2021 14:29 — forked from akexorcist/MaterialButtonGroup.kt
Material Button Group for Material Button in Android
package com.akexorcist.materialdesign
import android.content.Context
import androidx.core.view.MarginLayoutParamsCompat
import androidx.core.view.ViewCompat
import android.util.AttributeSet
import android.util.Log
import android.view.View
import android.widget.LinearLayout
import com.google.android.material.shape.AbsoluteCornerSize
@jukbot
jukbot / server.js
Created September 11, 2021 13:07 — forked from leanazulyoro/server.js
Next.js SSR Cache using LRU Cache
const express = require('express')
const next = require('next')
const Cache = require('lru-cache');
const compression = require('compression')
const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
@jukbot
jukbot / sample.js
Created August 31, 2021 17:16 — forked from jeffhuangtw/sample.js
[nodejs] server side check "androidpublisher.purchases.subscriptions.get" with "service account"
// Google Play API Key
// ref: http://stackoverflow.com/questions/35127086/android-inapp-purchase-receipt-validation-google-play
// ref: https://developers.google.com/android-publisher/authorization
// ref: http://google.github.io/google-api-nodejs-client/18.0.0/index.html#toc14__anchor
//
// install npm package
// ref: https://github.com/google/google-api-nodejs-client
// $ npm install googleapis --save
//
const google = require('googleapis');
@jukbot
jukbot / conventional_commit_messages.md
Created August 5, 2021 13:42 — forked from qoomon/conventional_commit_messages.md
Conventional Commit Messages

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@jukbot
jukbot / my.cnf
Created April 6, 2021 19:05 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated February 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@jukbot
jukbot / LearnGoIn5mins.md
Created January 11, 2021 15:05 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins
@jukbot
jukbot / clean-up-boot-partition-ubuntu.md
Created June 28, 2018 05:22 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@jukbot
jukbot / README.md
Created February 8, 2018 17:08 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@jukbot
jukbot / .eslintrc.js
Created October 10, 2017 23:31 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@jukbot
jukbot / sanfrancisco-font.css
Created August 7, 2016 18:38 — forked from bivainis/sanfrancisco-font.css
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2");
}