Skip to content

Instantly share code, notes, and snippets.

View wiput1999's full-sized avatar
🌍

Wiput Pootong wiput1999

🌍
View GitHub Profile
@mpsido
mpsido / Learning-how-to-learn.md
Last active February 16, 2019 08:33
Techinics to optimize how you use your brains

Learning how to learn

I've been following this course called "Learning how to learn".

I would like to share what I learned in the course and also the thoughts I came through while reading that course.

The right use of the ingredients of learning

If I look back at the myself of few years ago, I think I would be thinking something like: "Why do I need to study how to learn, I am already able to learn stuff !".

@acoshift
acoshift / nginx.tmpl
Created July 15, 2017 19:40
nginx ingress controller template for gce tcp lb
{{ $cfg := .Cfg }}
{{ $IsIPV6Enabled := .IsIPV6Enabled }}
{{ $healthzURI := .HealthzURI }}
{{ $backends := .Backends }}
{{ $proxyHeaders := .ProxySetHeaders }}
daemon off;
worker_processes {{ $cfg.WorkerProcesses }};
pid /run/nginx.pid;
{{ if ne .MaxOpenFiles 0 }}
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 4, 2024 18:30
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@m-coding
m-coding / regex-yyyy-mm-dd.js
Last active January 22, 2024 06:36
javascript regex to match date pattern YYYY-MM-DD
// allows YYYY/M/D and periods instead of slashes
// http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd
/^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/
// YYYY-MM-DD and YYYY-M-D
// http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript
/^\d{4}\-\d{1,2}\-\d{1,2}$/
// YYYY-MM-DD
// https://gist.github.com/arth2o/8471150