# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
์๋ฌธ์์ ๋ฒ์ญ ๋ฐ (์ผ์ ์ถ๊ฐํ๊ธฐ ์ํด)์ฒจ์ญ.
- https://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
- https://medium.com/commitlog/a-brief-totally-accurate-history-of-programming-languages-d2e2b09553f8
์กฐ์ ํ ๋ง๋ฆฌ ์์นด๋ฅด Joseph Marie Jacquard๋ ์ค๋ฐ๋กํฌ ๊ธฐ๊ณ์(์๋ฌธ์ ๋ฐฉ์ง๊ธฐ๊ณ) ์ฒ๊ณต์นด๋๋ฅผ ๋จน์ฌ ์ต์ด์ ์ด-๋ค์ค์ฐ๋ ๋ ์ฒ๋ฆฌ์ฅ์น๋ฅผ ๊ฐ๋ฐํ๋ค (์ญ์ฃผ: thread์๋ ๋ฐ๋์ง ์ค์ด๋ผ๋ ๋ป์ด ์๋ค). ์ด ๋ฐ๋ช ํ์ ๋ก๋ด์ด ์ผ๊ฐ์ ๋นผ์์ ๊ฒ์ ์ฐ๋ คํ๋ ๋น์์ ๋ ธ๋์์๊ฒ ๊ฑฐ๋ํ ๋ฐ๋๋ฅผ ๋ฐ์๋ค.
export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
// arrays | |
e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
// components | |
e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
// create notes | |
m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
// diff props |
The following describes how you can publish artifacts for any sbt project using the GitHub Package Registry and the sbt-github-packages plugin.
In your GitHub account, go to Settings > Developer settings > Personal access tokens, then click on Generate new token (or click here). Fill in some sort of meaningful name (I chose Dev) and click on the write:packages
checkbox:
// unfortunately | |
// opaque type Fix[F[_]] = F[Fix[F]] | |
// won't work (no recursion in opaque type), but this implementation is safe, but scary due to asInstanceOf | |
object FixImpl { | |
type Fix[F[_]] | |
inline def fix[F[_]](f: F[Fix[F]]): Fix[F] = f.asInstanceOf[Fix[F]] | |
inline def unfix[F[_]](f: Fix[F]): F[Fix[F]] = f.asInstanceOf[F[Fix[F]]] | |
} |
Greg Beech wrote an article on Akka HTTP Entity Validation. This post is on the same topic, except we are going to use typeclass instances, as opposed to subtyping, for form validations.
To start with, let us suppose that we are working on some sort of user management service using Scala/Akka. However, here we are only going to focus on the registration part, in which the client is expected to send a user data, in JSON format; and the server needs to validate them, and save the user if the validations succeed, or reject the request with all the errors detected. That said, we should keep in mind that our validations may be used through out the entire codebase, not just in the user registration endpoint.
The rules for our validation are as follows:
์๋ ๋ด์ฉ์ ์ง๋ 2์ 3์ผ [email protected]์ ๋ณด๋ธ ๋ฉ์ผ์ ๊ฑฐ์ ๊ทธ๋๋ก ์ ์ฌํ ๊ฒ์ด๋ค. ๋ ๋ฌ ๋๊ฒ ์๋ต์ ์์๋ค.
10์ผ ๋๊ฒ ์๋ต์ ๋ฐ์ง ๋ชปํ ๋ค ๊น๋์ธ ๋ด๋น ๊ธฐ์์๊ฒ ํธ์ํฐ๋ก ์ฐ๋ฝ์ ์๋ํ์ผ๋ ์ด ๋ํ ์๋ต๋ฐ์ง ๋ชปํ๋ค.
ํด๋น ๊ธฐ์ฌ๋ ํ์ฌ๋ ์ฌ์ ํ ํ์ด์ดํญ์ค์์ ์ ์์ ์ผ๋ก ํ์๋์ง ์๋๋ค. (2019-04-15)
์๋ ํ์ธ์. [<๋๋ฆผ๋์์ ๋ณด๋ธ ์๋ฅธ ๋ฒ์ ๋ฐค>][1] ๊ธฐ์ฌ๋ฅผ ๋ณด๊ณ ์ฌ์ํ์ง๋ง ์ค์ํ ์ ์๋ ๋ฌธ์ ๋ฅผ ์๋ ค ๋๋ฆฌ๊ณ ์ ๊ธ์ ์๋๋ค.
๋ณธ ๊ธฐ์ฌ๋ (์์ฆ์์๋ ๋ด์ํ์์ฆ ๋ฐ์๊ฐ ๋๋ฌด ๋ง์ด ์จ์ ์คํ๋ ค ์์ํ ์ ์๋) ์คํฌ๋กคํ ๋๋ง๋ค ์ ๋๋ฉ์ด์ ์ด ํ์ด ๋์ค๋ ์ธํฐ๋ํฐ๋ธ ํฌ๋งท์ ์ฐ๊ณ ์์ต๋๋ค๋ง, ํด๋น ํฌ๋งท์ด ๊ตฌ๊ธ ํฌ๋กฌ์์๋ง ํ ์คํธ๋ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค. ๋ชจ๋ ๋ธ๋ผ์ฐ์ ๋ฅผ ํ ์คํธํ์ง
์ค๋ ์ด๋ค ๋ถ์ด(์ฑํจ์ ๋ฐํ๋ ๋๋์ง ๋ชฐ๋ผ์...) ์ค๋ผํด ํด๋ผ์ฐ๋ ๊ธฐ์ ๋ธ๋ก๊ทธ์ ๊ธ์ด ์ ๊ฐ ์ด Terraform ๊ธ์ ๊ทธ๋๋ก ๊ฐ์ ธ๋ค๊ฐ ๋ฌธ์ฒด๋ง ๋ฐ๊ฟ์ ์ฌ๋ ธ๋ค๋ ๊ฒ์ ์๊ฒ ๋์์ต๋๋ค.
๋น์ฐํ ์ถ์ฒํ๊ธฐ๋ ์์๊ณ ๊ธ์ ๋ด์ฉ์ ํ์ธ ๊ฒฐ๊ณผ ์ ๊ธ์ ๋ฐํ์ผ๋ก ๊ตญ๋ฌธ์ผ๋ก ์์ฑํ ์ฉ์ด๋ฅผ ์๋ฌธ์ผ๋ก ๊ต์ฒดํ๊ฑฐ๋ ๋ง์ถค๋ฒ์ ๊ต์ ํ๊ฑฐ๋ ๋ฐ๋ง๋ก ์์ฑํ ๋ฌธ์ฅ์ ์กด๋๋ง๋ก ๋ฐ๊พธ๊ณ ์ผ๋ถ ๋ด์ฉ์ ์ค๋ผํด ํด๋ผ์ฐ๋์ ์ฌ๋ ธ๋ค๋ ๊ฒ์ ํ์ธํ์ต๋๋ค.
์ ๊ธ์ ๋ด์ฉ์ด ์ ์ฒด ๊ธ์ ๋๋ถ๋ถ์ด๊ธฐ ๋๋ฌธ์ ์๋์ ์ผ๋ก ์ ๊ธ์ ๊ฐ์ ธ๊ฐ์ ํธ์ง ํ ์ง์ ์์ฑํ ๊ฒ์ฒ๋ผ ๋ณด์ด๋๋ก ์๋ํ๋ค๊ณ ์๊ฐํ๊ณ ์๊ณ ์ ๊ธ์ด CC BY-NC-SA 2.0 ๋ผ์ด์ผ์ค ํ์ ๊ณต๊ฐํ๊ณ ์์ผ๋ฏ๋ก ์ด๋ ๋ผ์ด์ผ์ค ์๋ฐ์ด๋ผ๊ณ ์๊ฐํ๊ณ ์์ต๋๋ค.
ํด๋น ๋ธ๋ก๊ทธ๋ ์ค๋ผํด ํด๋ผ์ฐ๋์ ๋ํ ๋ธ๋ก๊ทธ์ด๊ณ ๊ธ์ ์ฐ์ "๊ฐ์ง์ "๋๋ "ํ๊ตญ ์ค๋ผํด์ ํด๋ผ์ฐ๋ ์ธ์ผ์ฆ ์ปจ์คํ ํ ์์"์ด๋ผ๊ณ ์จ ์๋ ๊ฒ์ผ๋ก ๋ณด์ ํด๋น ๋ธ๋ก๊ทธ๋ ํ๊ตญ ์ค๋ผํด์์ ์ด์ํ๋ ๋ธ๋ก๊ทธ๋ก ๋ณด์ ๋๋ค.
ํน์ ๊ธ์ด ๋ณ๊ฒฝ๋๊ฑฐ๋ ์ง์์ง ์ง ๋ชฐ๋ผ์ ์คํฌ๋ฆฐ์ท์ ์ฒจ๋ถํฉ๋๋ค.
There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.
- ffmpeg
- macOS:
brew install ffmpeg
- Ubuntu/Debian:
apt install ffmpeg
- macOS: