Skip to content

Instantly share code, notes, and snippets.

View xeusteerapat's full-sized avatar
🤔
Focusing

Teerapat Prommarak xeusteerapat

🤔
Focusing
View GitHub Profile
@Danilo-Araujo-Silva
Danilo-Araujo-Silva / install_octave_with_gui_and_gnuplot_on_macos_mojave.txt
Last active July 5, 2019 14:57
Install Octave with gui and gnuplot on macOS Mojave
# Install homebrew, if is not already installed:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Update and upgrade homebrew, if needed:
brew update && brew upgrade
# Install XCode (it is a long download, it is an Octave dependency)
# Go to Apple Store and install.
# Install Aquaterm
@xeusteerapat
xeusteerapat / autoScroll.js
Created May 31, 2020 06:12
Auto scroll mouse to the bottom of the page.
let intervalID = window.setInterval(function() {
window.scrollTo(0, document.body.scrollHeight)
}, 1000)
// to stop
window.clearInterval(intervalID)
@gologo13
gologo13 / a.js
Last active January 23, 2022 06:05
Circular dependency problem and its solutions for node.js
"use strict";
var B = require('./b');
var A = module.exports = (function() {
var id, bInstance;
return {
init: function init(val) {
id = val;
@0xadada
0xadada / README.md
Last active August 5, 2022 16:48
VIM movement, keyboard commands and shortcuts
/* Helper buddy for removing async/await try/catch litter 🗑 */
function O_o(promise) {
return promise.then(data => {
if (data instanceof Error) return [data]
return [null, data]
}).catch(err => [err])
}
/* Look ma, no try/catch */
async function usageExample(params) {
@nicolasdao
nicolasdao / aws_serverless_recipes.md
Last active September 26, 2023 17:17
Recipes for AWS Lambda with Serverless Framework. A series of recipes to get shit done using the Serverless Framework. Keywords: serverless recipe code recipes lambda lambdas function
@bvaughn
bvaughn / LICENSE.md
Last active November 9, 2023 07:13
Advanced example for manually managing subscriptions in an async-safe way using hooks

The MIT License (MIT)

Copyright © <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@rosswd
rosswd / multi-git-win.md
Last active February 28, 2024 09:46
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@turbo
turbo / std.md
Last active April 14, 2024 09:18
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.