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
@streamich
streamich / lambda.js
Last active April 29, 2024 19:45 — forked from maxbeatty/lambda.js
using node-postgres (`pg`) in AWS Lambda
import λ from "apex.js";
import { Pool } from "pg";
// connection details inherited from environment
const pool = new Pool({
max: 1,
min: 0,
idleTimeoutMillis: 120000,
connectionTimeoutMillis: 10000
});
@qoomon
qoomon / conventional_commit_messages.md
Last active May 4, 2024 07:07
Conventional Commit Messages

Conventional Commit Messages

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

Tip

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

Commit Message Formats

Default

@Dabolus
Dabolus / Deploying PWA Starter Kit to Firebase.md
Last active June 26, 2020 01:39
A simple guide that explains how to deploy PWA Starter Kit to Firebase

Note: this guide explains step by step how to add Firebase to PWA Starter Kit.

If you already have some Firebase knowledge and you just want to get everything ready out of the box, you might want to checkout the Firebase branch on the PWA Starter Kit repo, that already contains all the needed files.

Deploying prpl-server to Firebase

Firebase Hosting alone is not sufficient for hosting the prpl-server build since it requires some server-side processing of the user agent string. Instead, you will have to use Firebase Functions for that.

  1. Sign up for a Firebase account
@scheglov
scheglov / flutter_outline_live_preview.dart
Last active April 7, 2018 21:49
Example of Flutter code to demonstrate Flutter Outline with preview.
import 'package:flutter/material.dart';
class MyWidget extends StatelessWidget {
final String firstText;
MyWidget(this.firstText);
factory MyWidget.forDesignTime() {
return new MyWidget('AA');
}
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
@akexorcist
akexorcist / index.js
Last active November 17, 2022 11:25
Axios post method requesting with x-www-form-urlencoded content type. See https://axios-http.com/docs/urlencoded
const axios = require('axios')
/* ... */
const params = new URLSearchParams()
params.append('name', 'Akexorcist')
params.append('age', '28')
params.append('position', 'Android Developer')
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/')
params.append('awesome', true)
@Gomah
Gomah / Dockerfile
Last active March 23, 2021 14:33
Nuxt.js Dockerfile :: Now.sh
FROM node:10-alpine
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn install
@primaryobjects
primaryobjects / commit.png
Last active May 31, 2023 09:34
How to setup prettier as a pre-commit hook for Git commits.
commit.png
@thelinuxlich
thelinuxlich / docker-compose.yml
Created June 9, 2017 03:55
Redis Cluster with Docker Compose v3
version: "3.1"
services:
redis-master-1:
build: ./
networks:
redisnet:
ipv4_address: 10.0.0.2
command: sh -c "redis-server /src/redis.conf --port 7000 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000"
redis-master-2:
build: ./
@crackcomm
crackcomm / docker-compose.yml
Created March 20, 2017 17:19
NSQ docker-compose
nsqlookup:
image: nsqio/nsq
hostname: nsqlookup
ports:
- "4160:4160"
- "4161:4161"
command: /nsqlookupd
nsq: