- 近藤うちお
- 著書に、以下があります
- やわらかHubot https://gist.github.com/udzura/0cb2447c305c51670414
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // my brain decided to ask the question: yknow, i want you to think about the y combinator -- | |
| // like, what is it. like what the fuck girl, cmon, you have a comp sci degree, you should know this, and understand it and shit | |
| // and so i was like fiiiiiiiiiiiiiiine gosh, lets see if typescript can handle the typing, and play around with it | |
| // so i looked up a javascript implementation, and played with the type defintion until it | |
| // matched up and then i was like oh: thats what the type definition of the functions in it are. | |
| // i get it now. that's pretty cool. the main interesting thing is a the inner function that takes itself | |
| // and returns the function initially passed to the outer function. neato. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The two main components are the interfaces | |
| // Generic<T, Context> and GenericArg<"identifier"> | |
| // Generic basically structurally replaces types in T that are GenericArg<S> | |
| // for some `S extends keyof Context` with `Context[S]` | |
| // See the test cases for specific uses. | |
| // ====== TESTING | |
| // Pass through for trivial types | |
| type Test00 = Generic<number>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8 | |
| http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 | |
| http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8 | |
| http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on | |
| http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8 |
How to configure your Mac to use DNS over TLS in five easy steps:
-
Install Stubby with Homebrew (https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby):
brew install stubby -
Edit the configuration file:
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var webpack = require('webpack'); | |
| var MemoryFS = require('memory-fs'); | |
| var SingleEntryDependency = require('webpack/lib/dependencies/SingleEntryDependency'); | |
| var fs = new MemoryFS(); | |
| fs.mkdirpSync('/src'); | |
| fs.writeFileSync('/src/app.js', 'require("./dep.js")', 'utf-8'); | |
| fs.writeFileSync('/src/dep.js', 'module.exports = function(msg){console.log(msg)}', 'utf-8'); | |
| fs.writeFileSync('/src/extra-entry.js', 'require("./dep.js")', 'utf-8'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <linux/init.h> | |
| #include <linux/module.h> | |
| #include <linux/kernel.h> | |
| #include <linux/list.h> | |
| #include <linux/slab.h> | |
| struct birthday { | |
| int day; | |
| int month; | |
| int year; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| UPDATED for 2023 - Now much simpler. The old tricks are no longer needed. | |
| The following code makes an 800×600 canvas that is always as sharp as possible for the device. | |
| You still draw on it as if it's the logical size (800×600 in this case), but everything just | |
| looks sharper on high-DPI screens. Regular non-sharp screens are not affected. | |
| */ | |
| const width = 800 |
