Skip to content

Instantly share code, notes, and snippets.

View dtinth's full-sized avatar
🎶
𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪

Thai Pangsakulyanont dtinth

🎶
𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪
  • @bemusic                 @creatorsgarten                 @eventpop                 @showdownspace                 @spacetme                @wonderfulsoftware                
  • Krungthepmahanakhonamonrattanakosinmahintharayutthayamahadilokphopnoppharatratchathaniburiromudomratchaniwetmahasathanamonphimanawatansathitsakkathattiyawitsanukamprasit (Bangkok), Thailand
  • YouTube @dtinth
View GitHub Profile
import * as Immutable from 'immutable'
import * as rxjs from 'rxjs'
import { scan, startWith, map } from 'rxjs/operators'
export function reactiveHangman(
secretWord: string,
letters: rxjs.Observable<string>
): rxjs.Observable<Output> {
const initialState = initialize(secretWord)
return letters.pipe(
/* A */
export function Card (props) {
return (
<CardContainer centered={props.centered}>
<CardTitle>{props.title}</CardTitle>
<CardContent>{props.children}</CardContent>
</CardContainer>
)
}
const CardContainer = styled.article`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.layout {
display: flex;
<style>
.x{display:inline-block;padding:20px;border-left:1px solid #ddd;font:bold 20px sans-serif}
</style>
<div>
<span class=x style="border:0">[LOGO]</span>
<span class=x>SEE & DO</span>
<span class=x>FESTIVAL & EVENTS</span>
<span class=x>EAT & DRINK</span>
<span class=x>SHOP</span>
<span class=x>STAY</span>
@dtinth
dtinth / app.js
Created September 15, 2017 19:26
Demonstrates the problem of DelegateModules not updating hash
console.log(require('./library'))
@dtinth
dtinth / decrypt.clj
Created September 5, 2017 18:12
Node.js encrypt -> Clojure decrypt RSA
(defn load-private-key
[key-str]
(crypto/decode-private-key {:algorithm "RSA"
:bytes (-> key-str
crypto/decode-base64)}))
(defn decrypt-str
[private-key text-to-decrypt]
(let [cipher (crypto/create-cipher "RSA/ECB/OAEPWithSHA1AndMGF1Padding")]
(crypto/decrypt private-key
const memoizeArraySelector = (baseSelector) => {
let _last = [ ]
return (state) => {
const result = baseSelector(state)
if (arrayEquals(result, _last)) return _last
_last = result
return result
}
}
'.source.js':
'import react':
prefix: 'ir'
body: '''
import React from 'react'
'''
'export function':
prefix: 'ef'
body: '''
export function $1 ($2) {
export class FirebaseAuth extends React.Component {
static propTypes = {
children: PropTypes.func.isRequired
}
auth = firebase.auth()
state = { user: this.auth.currentUser }
componentDidMount () {
this.unsubscribe = this.auth.onAuthStateChanged(user => {
this.setState({ user })
})

When extracting .zip files with Japanese encoding using p7zip in UTF-8 locale, a double-encoded file name is created:

\u0082±\u0082ñ\u0082É\u0082¿\u0082Í\u0081I.txt

Upon closer inspection, some code-points are > 127 and all of them < 256.

> filename.codepoints