Forwarded from 每日 AWESOME 观察
isomorphic-git
纯 js 实现的 git 库,可以实现正常 git 所有的功能且完美兼容。如果你想用 js 操作你的 git repo,这是最好的选择,因为它不依赖你本地的 git 安装。它甚至不依赖任何nodejs api,还可以在浏览器使用虚拟文件系统工作。
纯 js 实现的 git 库,可以实现正常 git 所有的功能且完美兼容。如果你想用 js 操作你的 git repo,这是最好的选择,因为它不依赖你本地的 git 安装。它甚至不依赖任何nodejs api,还可以在浏览器使用虚拟文件系统工作。
GitHub
GitHub - isomorphic-git/isomorphic-git: A pure JavaScript implementation of git for node and browsers!
A pure JavaScript implementation of git for node and browsers! - isomorphic-git/isomorphic-git
https://github.com/haml/html2haml 🤔 从 HTML 反向回 haml 吗 当然还是要做的
[noryb009/AalibTranslator: A basic translator for Haiku that translates bitmaps into ASCII art using aalib](https://github.com/noryb009/AalibTranslator) Haiku 是一个操作系统 😓
github.com/elbongurk/aalib
[python-aalib/aalib.py at master · jwilk/python-aalib](https://github.com/jwilk/python-aalib/blob/master/aalib.py)
[masahino/mruby-aalib](https://github.com/masahino/mruby-aalib)
[aalib.js/aalib.js at master · moriyoshi/aalib.js](https://github.com/moriyoshi/aalib.js/blob/master/aalib.js#L3129) 感觉有点 C transpile 的感觉,可是 API 不一样,除了内联 font bytearray 很蠢其他倒没啥
https://github.com/stroucki/bb 指环、软体、 mandelbrot 集的动画
https://github.com/artyfarty/bb-osx 构建方法:
如果显示 X font open fail ,就只能
如果 sound 导致 bb 卡住的话,据我看了下只有 main.c 里有几行支持代码是基于 libMikMod 的,它的 panel config (kw: tolower) 实际就是在 edit md_mode bitflags 和 samplerate ,只能
: This s3m has been made by Dawn Music for the demo called "BB". This s3m is especially dedicated to my girlfriend Eva. She's so far from me and I spend so much time without her. I'm waiting for you, Sandqueen. I want you to want me just like I want you. Your little man. Composed:April 1997,Dawn
另外这个在 metadata 里公开表白,真是虐到我了,程序员的爱情 😳
这个人除了会绘制和计算机图形学,还很熟悉 C, linux 和二进制,是标准的「那个年代的程序员」
现在看起来我也有这种倾向了,好怀念啊
最关键的是 DEMO 动画里的数学渐变、文字缩放和粒子路径规划和 aalib 本身的技术吧,真的太细节了。 一个就吊打「新世纪」的所有 UI 动画呢
想想现在要看 text bitmap 就需要用 canvas 先画下
[noryb009/AalibTranslator: A basic translator for Haiku that translates bitmaps into ASCII art using aalib](https://github.com/noryb009/AalibTranslator) Haiku 是一个操作系统 😓
github.com/elbongurk/aalib
[python-aalib/aalib.py at master · jwilk/python-aalib](https://github.com/jwilk/python-aalib/blob/master/aalib.py)
[masahino/mruby-aalib](https://github.com/masahino/mruby-aalib)
[aalib.js/aalib.js at master · moriyoshi/aalib.js](https://github.com/moriyoshi/aalib.js/blob/master/aalib.js#L3129) 感觉有点 C transpile 的感觉,可是 API 不一样,除了内联 font bytearray 很蠢其他倒没啥
https://github.com/stroucki/bb 指环、软体、 mandelbrot 集的动画
https://github.com/artyfarty/bb-osx 构建方法:
touch README; aclocal && automake --add-missing && autoconf && autoupdate; ./configure && make 如果显示 X font open fail ,就只能
-driver curses 了如果 sound 导致 bb 卡住的话,据我看了下只有 main.c 里有几行支持代码是基于 libMikMod 的,它的 panel config (kw: tolower) 实际就是在 edit md_mode bitflags 和 samplerate ,只能
./bb &ffplay bb3.s3m 直接播了ffplay bb.s3m -hide_banner -nodisp &./bb -driver curses(如果最后退不出,
fg 一下 ffplay 的 [N] job num 再 Ctrl-C: This s3m has been made by Dawn Music for the demo called "BB". This s3m is especially dedicated to my girlfriend Eva. She's so far from me and I spend so much time without her. I'm waiting for you, Sandqueen. I want you to want me just like I want you. Your little man. Composed:April 1997,Dawn
另外这个在 metadata 里公开表白,真是虐到我了,程序员的爱情 😳
这个人除了会绘制和计算机图形学,还很熟悉 C, linux 和二进制,是标准的「那个年代的程序员」
现在看起来我也有这种倾向了,好怀念啊
最关键的是 DEMO 动画里的数学渐变、文字缩放和粒子路径规划和 aalib 本身的技术吧,真的太细节了。 一个就吊打「新世纪」的所有 UI 动画呢
GitHub
GitHub - haml/html2haml: Convert HTML and HTML+Erb to Haml.
Convert HTML and HTML+Erb to Haml. Contribute to haml/html2haml development by creating an account on GitHub.
#js #code [doge] 哈!手机上一次就写对了
好耶!是元编程
妈耶…… 看来还是包装下比较好😓 这个代码不可能短
#GitHub 上找了半天最终发现 https://github.com/bnoguchi/hooks-js 和 https://github.com/buddyspike/easy-intercept 是可以用的,另外还有三四个标准研究性的 intercept 和一大堆只能针对 XHR API 的🌚👍
https://github.com/search?p=4&q=JS+intercept&type=Repositories
你前端还是你前端,复用都懒得做🌝🤔
"JavaScript 能表达的程序最终都会被写出来"
前端娱乐圈✅
const swap=(k,a,b)=>{ let va=a[k]; a[k]=b[k]; b[k]=va; },
hook=(o,op_tab)=>{
let old={};
for (let k in op_tab) { swap(k, old, o); let f=op_tab[k]; o[k]=function hooked(...args) {args.push(old); return f.apply(this, args)}; }
let attrs = Object.keys(op_tab);
function undo() { this.attrs.forEach(k => swap(k, old, o)); }
return {attrs, undo};
}
function add(a,b) {return a+b}
h=hook(window, {add: (a,b,old)=>{console.log(a);return old.add(a,b)}})
不过有个问题, 不能同时兼容 prototype ,没 bound好耶!是元编程
const
swap=(k,a,b)=>{ let va=a[k]; a[k]=b[k]; b[k]=va; },
boundCopy=(!!Proxy)? (o,ks)=>self=>new Proxy({}, {get: (o1,k)=>o[k].bind(self)}) : (o,ks)=>self=>{ let bound={}; for (let k of ks) Object.defineProperty(bound, k, {get: ()=>o[k].bind(self)}); return bound; },
hook=(o,op_tab)=>{
let old={}, attrs = Object.keys(op_tab);
for (let k of attrs) { swap(k, old, o); let f=op_tab[k]; o[k]=function hooked(...args) {args.push(boundCopy(old, attrs)); return f.apply(this, args)}; }
function undo() { this.attrs.forEach(k => swap(k, old, o)); }
return {attrs, undo};
} orig(this).fn 这样用:let hooky = {
log(...ho) { hookAll(...ho, (...args,orig)=>{ console.log(args); let res=orig(this)[ho[1]](...args); console.log(res); return res; }); },
breakIf(p, ...ho) {},
stopIf(p, ...ho) {},
onValues(op, ...ho) {},
insts: {},
saveInstances(...ho) {}
} 妈耶…… 看来还是包装下比较好😓 这个代码不可能短
#GitHub 上找了半天最终发现 https://github.com/bnoguchi/hooks-js 和 https://github.com/buddyspike/easy-intercept 是可以用的,另外还有三四个标准研究性的 intercept 和一大堆只能针对 XHR API 的🌚👍
https://github.com/search?p=4&q=JS+intercept&type=Repositories
你前端还是你前端,复用都懒得做🌝🤔
"JavaScript 能表达的程序最终都会被写出来"
前端娱乐圈✅
GitHub
GitHub - bnoguchi/hooks-js: Augment your methods with pre and post hooks
Augment your methods with pre and post hooks. Contribute to bnoguchi/hooks-js development by creating an account on GitHub.
Media is too big
VIEW IN TELEGRAM
ffmpeg -i 2021-03-09\ 07-10-22.mkv -ss 2 -to 7:14 -i Projects/bb-osx/bb3.s3m -map 0:v:0 -map 1:a:0 bb.mp4
duangsuse::Echo
#js #web #DontKnow DOM 小提示! 😘 1. with(e.parentNode){ insertBefore(e1, e); removeChild(e) }可以用 e.replaceWith(e1) 替换 2. e.remove() 等于 e.parentNode.removeChild(e) 3. children, firstChild, prevElementSibling 不会获取到 text node 而 childNodes, parentNode, nextSibling…
#html #dom #API #doc #dontknow
https://duangsuse-valid-projects.github.io/Share/HTMLs/school/ 🌝新写了个弹球动画,我真是 HIGH 到不行,赛高哩HIGH哒≈
https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats
还有之前的剪贴板我也查了
[在线Html编辑器粘贴过滤技术详解(一)_weixin_33910460的博客-CSDN博客](https://blog.csdn.net/weixin_33910460/article/details/89910701)
[JavaScript如何获取粘贴事件的剪贴板数据(跨浏览器)? - 问答 - 云+社区 - 腾讯云](https://cloud.tencent.com/developer/ask/186776)
另外在找的时候我发现一个 1k star 的 JS DOM 变动静态库,思想挺有意思的,不用 MutationObserver 和 NodeIterator,TreeWalker (
https://github.com/muicss/sentineljs
然并暖,到 DevTools events/debugger 面板看看 DOM Events 的归类就能发现有一大堆 DOM 变动的事件支持嵌套次序🌚
稍有常识的人不难看出,如果我们的 API 继续前进,类似的魔法还能有价值吗?
https://duangsuse-valid-projects.github.io/Share/HTMLs/school/ 🌝新写了个弹球动画,我真是 HIGH 到不行,赛高哩HIGH哒≈
https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats
还有之前的剪贴板我也查了
document.querySelectorAll("[contenteditable]").forEach(e=>e.onpaste=(ev)=>{ e.execCommand("paste",false,ev.clipboardData.getData("text/plain")); })
[在线Html编辑器粘贴过滤技术详解(一)_weixin_33910460的博客-CSDN博客](https://blog.csdn.net/weixin_33910460/article/details/89910701)
[JavaScript如何获取粘贴事件的剪贴板数据(跨浏览器)? - 问答 - 云+社区 - 腾讯云](https://cloud.tencent.com/developer/ask/186776)
另外在找的时候我发现一个 1k star 的 JS DOM 变动静态库,思想挺有意思的,不用 MutationObserver 和 NodeIterator,TreeWalker (
document.createXXX(e).nextNode() ) 什么的,而是利用了自定义 @keyframes 的事件 animationStart 。 API 类似 inotify , on(selector,op) 这样https://github.com/muicss/sentineljs
然并暖,到 DevTools events/debugger 面板看看 DOM Events 的归类就能发现有一大堆 DOM 变动的事件支持嵌套次序🌚
$0.addEventListener("DOMSubtreeModified",console.log); $0.getRootNode().body.setAttribute("contenteditable","") Share
School
🐕 duangsuse’s shared files(e.g. productive software projects, documents)
duangsuse::Echo
#html #dom #API #doc #dontknow https://duangsuse-valid-projects.github.io/Share/HTMLs/school/ 🌝新写了个弹球动画,我真是 HIGH 到不行,赛高哩HIGH哒≈ https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats 还有之前的剪贴板我也查了 document.querySelectorAll("[…
#Web #Learn #meme
❎了解单独、配对、折叠三种标签形式及 &; escape,会创建、访问节点和常用 attribute 、事件和 on 简写;擅长动态加载、拼接资源如 link 和 script;会利用 form 和 meta,link 标签
❎能利用 CSS 做 responsive design 、用元素 state 伪选择器做交互动画,会使用 flex 和 grid
❎了解 HTTP 的 URL, Header 和 Cookie 性质,善用 XMLHttpRequest 和 fetch API
❎会用 PJAX 和 iframe 做复杂的跨页共享应用
❎从不编写冗余 HTML ,总能通过 JS API 实现文本翻译等灵活文档变形功能
❎擅长使用各种(简化性)模板语言、jsx, mdx,以及 emmet.io 等快速开发工具。
✅随意滥用新 pointer events 不加 polyfill 导致多种客户端上交互无法使用
✅张口闭口 DOM 和 ES6 而不谈 HTML 和 JS (ES6就是新JS)
✅乱用 Chrome-only 的 getEventListeners API 和极其 cutting edge 的 Element.getAnimations
✅膜拜 URL,MIME 和 URI,base64 以及 DevTools 的便利但几乎从不好好使用它们
✅滥用 strike 删除线
✅从不区分 ins,u; del,s; em,i 和 visibility:hidden; display:none; 和 br,pre; textContent/innerHTML; onload,DOMContentLoaded; firstElementChild/firstChild 也搞不清 append 与 appendChild 有什么区别
✅在网页里直接放 ES6 甚至 ES2016 的屑(提示: 对应关系 n-2015+6)
❎了解单独、配对、折叠三种标签形式及 &; escape,会创建、访问节点和常用 attribute 、事件和 on 简写;擅长动态加载、拼接资源如 link 和 script;会利用 form 和 meta,link 标签
❎能利用 CSS 做 responsive design 、用元素 state 伪选择器做交互动画,会使用 flex 和 grid
❎了解 HTTP 的 URL, Header 和 Cookie 性质,善用 XMLHttpRequest 和 fetch API
❎会用 PJAX 和 iframe 做复杂的跨页共享应用
❎从不编写冗余 HTML ,总能通过 JS API 实现文本翻译等灵活文档变形功能
❎擅长使用各种(简化性)模板语言、jsx, mdx,以及 emmet.io 等快速开发工具。
✅从不区分 ins,u; del,s; em,i 和 visibility:hidden; display:none; 和 br,pre; textContent/innerHTML; onload,DOMContentLoaded; firstElementChild/firstChild 也搞不清 append 与 appendChild 有什么区别
✅在网页里直接放 ES6 甚至 ES2016 的屑(提示: 对应关系 n-2015+6)
Forwarded from 层叠 - The Cascading
由于一个二月引入的 racing condition 相关的 bug,GitHub 的后端可能把用户的 session cookie 给予其它用户。这个问题现已修复。安全起见,GitHub 在早些时候强制登出了北京时间昨晚八时前登入的所有用户。如果你发现自己曾登入 GitHub 的浏览器自动登出了,这是正常现象。
https://github.blog/2021-03-08-github-security-update-a-bug-related-to-handling-of-authenticated-sessions/
src: https://t.me/billchenla/9399
linksrc: https://t.me/allo_9b/3788
https://github.blog/2021-03-08-github-security-update-a-bug-related-to-handling-of-authenticated-sessions/
src: https://t.me/billchenla/9399
linksrc: https://t.me/allo_9b/3788
The GitHub Blog
GitHub security update: A bug related to handling of authenticated sessions
On the evening of March 8, we invalidated all authenticated sessions on GitHub.com created prior to 12:03 UTC on March 8 out of an abundance of caution.
Forwarded from Yuuta 🎀 | clrd enroute
Telegram
鳖频道
#java程序员看见气死系列