Skip to content

Instantly share code, notes, and snippets.

View kyungw00k's full-sized avatar
πŸ‘‹

Kyungwook, Park kyungw00k

πŸ‘‹
View GitHub Profile
@WaldoJeffers
WaldoJeffers / compose.js
Last active January 3, 2024 16:47
JavaScript one-line compose (ES6)
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)))
// Usage : compose functions right to left
// compose(minus8, add10, multiply10)(4) === 42
//
// The resulting function can accept as many arguments as the first function does
// compose(add2, multiply)(4, 10) === 42
@jherax
jherax / is-private-mode.js
Last active February 14, 2025 11:03
Detect if the browser is running in Private mode - Promise based (last update: Feb 2020)
/**
* Lightweight script to detect whether the browser is running in Private mode.
* @returns {Promise<boolean>}
*
* Live demo:
* @see https://output.jsbin.com/tazuwif
*
* This snippet uses Promises. If you want to run it in old browsers, polyfill it:
* @see https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js
*
@Avaq
Avaq / combinators.js
Last active April 29, 2025 17:32
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@stormoz
stormoz / install.bat
Last active February 10, 2022 08:57
Start Selenium Grid hub and nodes as Windows services
nssm install SeleniumHub java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -role hub
nssm start SeleniumHub
nssm install SeleniumNode1 java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -role node -hub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=C:\Selenium\chromedriver.exe
nssm set SeleniumNode1 DependOnService SeleniumHub
nssm start SeleniumNode1
nssm install SeleniumNode2 java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -role node -hub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=C:\Selenium\chromedriver.exe
nssm set SeleniumNode2 DependOnService SeleniumHub
nssm start SeleniumNode2
@haje01
haje01 / TensorFlow μ‹œμž‘ν•˜κΈ°.md
Last active May 3, 2024 07:30
TensorFlow μ‹œμž‘ν•˜κΈ°

ν…μ„œν”Œλ‘œμš° μ‹œμž‘ν•˜κΈ°

글쓴이: κΉ€μ •μ£Ό([email protected])

이 λ¬Έμ„œλŠ” ν…μ„œν”Œλ‘œμš° 곡식 νŽ˜μ΄μ§€ λ‚΄μš©μ„ λ°”νƒ•μœΌλ‘œ λ§Œλ“€μ–΄μ‘ŒμŠ΅λ‹ˆλ‹€.


μ†Œκ°œ

ν…μ„œν”Œλ‘œμš°(TensorFlow)λŠ” 기계 ν•™μŠ΅κ³Ό λ”₯λŸ¬λ‹μ„ μœ„ν•΄ κ΅¬κΈ€μ—μ„œ λ§Œλ“  μ˜€ν”ˆμ†ŒμŠ€ λΌμ΄λΈŒλŸ¬λ¦¬μž…λ‹ˆλ‹€. 데이터 ν”Œλ‘œμš° κ·Έλž˜ν”„(Data Flow Graph) 방식을 μ‚¬μš©ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

@bprosnitz
bprosnitz / iframe_contents.html
Created May 6, 2015 19:21
iframe origin security: dispatchEvent vs postMessage
<script>
window.addEventListener('message', function(event) {
console.log('iframe: Got postmessage in origin ' + location.origin + ' from origin: ' + event.origin + '(' + event.data + ')');
});
window.addEventListener('dispatchToIframe', function() {
console.log('iframe: Got dispatchEvent() in origin ' + location.origin + '(from index.html)');
});
setTimeout(function() {
window.dispatchEvent(new CustomEvent('dispatchFromIframe'));
@inceax
inceax / osmc-raspberrypi2.md
Last active November 14, 2020 05:19
raspberry pi 2에 osmc λΉ λ₯Έ μ„ΈνŒ…μ„ μœ„ν•œ 개인 μ„€μ • 기둝

osmc μ„ΈνŒ…

  • λΉ λ₯Έ μ„ΈνŒ…μ„ μœ„ν•œ 개인 μ„€μ • 기둝
  • osmc rc3, raspberry pi 2 κΈ°μ€€

ν•œκΈ€ν™”

μŠ€ν‚¨ ν•œκΈ€ν™”

  1. 폰트 μ„€μΉ˜
sudo apt-get install fonts-nanum
sudo cp /usr/share/fonts/truetype/nanum/NanumGothic.ttf /usr/share/kodi/addons/skin.osmc/fonts/
@hiasinho
hiasinho / modernie.md
Last active September 1, 2021 22:23
Internet Explorer on Vagrant

The Modern.ie Virtual Machine Images – VMs used for testing several versions of IE – are now also available as vagrant boxes. Here’s the list:

@philippschmitt
philippschmitt / countPhotosForGeoLocation
Last active May 13, 2020 22:02
Count all photos that are available on Flickr and Panoramio for a specific geo fence
/*
This script counts all photos that are available on Flickr and Panoramio for a specific geo fence and returns a JSON object with the data.
For convenience it's embedded in a little node.js server so that you can upload it to your server and use it as an API.
Here's an example url with all query attributes prefilled. Please use your own Flickr API key!
The location is the Berlin TV Tower (http://en.wikipedia.org/wiki/Fernsehturm_Berlin)
Example URL: http://piccounter-philippschmitt.rhcloud.com/?lat=52.520732&lon=13.409537&latRes=0.00015&lonRes=0.0003&flickrKey=60d03369d3e92b4578c8f2df2de5af66