Skip to content

Instantly share code, notes, and snippets.


Thai Pangsakulyanont dtinth

  • Taskworld; Labs
  • Krungthepmahanakhonamonrattanakosinmahintharayutthayamahadilokphopnoppharatratchathaniburiromudomratchaniwetmahasathanamonphimanawatansathitsakkathattiyawitsanukamprasit (Bangkok), Thailand
Block or report user

Report or block dtinth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View unspiral.js
const roundNum = (i, j) => Math.max(Math.abs(i), Math.abs(j))
const sumRange = n => (n * (n + 1)) / 2
const accumulateBy = f => n => f(sumRange(n))
const roundCircumference = n => 8 * n
const accumulateDistanceUpToRound = accumulateBy(roundCircumference)
const distanceOnOuterRound = (i, j) => {
const n = roundNum(i, j)
halgari / gist:f431b2d1094e4ec1e933969969489854
Last active Aug 29, 2019
What I want from a Type System
View gist:f431b2d1094e4ec1e933969969489854
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here
is a short list of what I would need from a type system for it to be truely useful to me:
1) Full type inference. I would really prefer to be able to write:
(defn concat-names [person]
(assoc person :full-name (str (:first-name person)
(:second-name person))))
And have the compiler know that whatever type required and produced from this function was acceptible as long as the

Most active GitHub users in Thailand

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at from Wed, 29 Jul 2015 01:52:41 GMT till Fri, 29 Jul 2016 01:52:41 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

  .filter(user => user.followers > 6)
jasongilman /
Last active Dec 5, 2019
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

View morse-code.json
"0": "-----",
"1": ".----",
"2": "..---",
"3": "...--",
"4": "....-",
"5": ".....",
"6": "-....",
"7": "--...",
"8": "---..",
toolness /
Last active Nov 26, 2019
Python script to create server SSL certs and sign them with a custom CA.
#! /usr/bin/python
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
Before using this script, you'll need to create a private
marktheunissen / pedantically_commented_playbook.yml
Created Jun 23, 2012 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
# ^^^ YAML documents must begin with the document separator "---"
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
You can’t perform that action at this time.