You are an expert programming assistant focusing on:
- TypeScript, React, Node.js, AstroJS 5.x, AstroDB
- Shadcn UI and Tailwind CSS useations
- Latest features and best practices
- Clear, readable, and maintainable code
import { Rx } from '@cycle/core' | |
import { h } from '@cycle/dom' | |
import CodeMirror from 'codemirror' | |
class CodeMirrorRenderer { | |
constructor(events) { | |
this.events = events; | |
} | |
hook(node, propertyName, previousValue) { |
elixir が結局速いのかそうでもないのか検証してみたいから、誰か isucon4 qual のアプリを elixir で。
— そのっつ (SEO Naotoshi) (@sonots) 2015, 9月 5
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
とかてきとうなことをつぶやいていたら、なんと @ma2ge さんが実装してくれました!
@sonots まずは動くところまで作ってみました。手元のマシンですが ruby との比較結果だけ README に載せています。benchmarker は通ったのですがバグなどあるかもしれません。 https://t.co/6WaI4LAbME
— taka (@ma2ge) 2015, 9月 7
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
#!/bin/bash | |
for keg in /usr/local/Library/LinkedKegs/*; do | |
kegname="$(basename $keg)" | |
dir="$(find $keg/ -maxdepth 1 -type d | grep '\/\(sbin\|bin\|etc\|var\|lib\|include\|libexec\|share\)$' | head -n1)" | |
[ -z "${dir}" ] && continue | |
testee="$(find $dir -type f | head -n1 | sed -e "s|${keg}||")" | |
[ -f /usr/local/$testee ] || (echo $keg && brew unlink $kegname; brew link --force $kegname) | |
done |
$ jruby -v | |
jruby 1.7.5.dev (1.9.3p392) 2013-09-04 090d5dd on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64] | |
$ time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 'require "rails"' | |
jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 5.18s user 0.47s system 136% cpu 4.142 total | |
$ time jruby -e 'require "rails"' | |
jruby -e 'require "rails"' 14.60s user 0.44s system 202% cpu 7.444 total |
brew install cmigemo | |
mkdir -p ~/.vim/bundle/manual/migemo/plugin | |
cd ~/.vim/bundle/manual/migemo/plugin | |
curl -L -O https://raw.github.com/koron/cmigemo/master/tools/migemo.vim | |
vi ~/.vimrc | |
NeoBundle 'migemo', {'type' : 'nosync', 'base' : '~/.vim/bundle/manual'} |
# Render Partials in ECO-Templates like in Rails-ERB | |
# | |
# usefull to clean up structure in spine.js and other js-mvc´s like backbone | |
# | |
# usage: | |
# <%- render_partial 'path/to/partial' %> .. will render ../spine-app/views/path/to/_partial.jst.eco | |
# <%- render_partial 'path/to/partial', foo: 'bar' %> .. will render ../spine-app/views/path/to/_partial.jst.eco .. locals = @foo | |
# | |
window.render_partial = ( path, options = {} ) -> | |
# add the leading underscore (like rails-partials) |
gem 'omniauth' | |
gem 'omniauth-facebook' | |
gem 'clearance' |
diff --git a/screen-write.c b/screen-write.c | |
index 15f8d07..8a175a6 100644 | |
--- a/screen-write.c | |
+++ b/screen-write.c | |
@@ -1334,6 +1334,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc) | |
ctx->cells++; | |
/* If the width is zero, combine onto the previous character. */ | |
+ /* | |
if (width == 0) { |
// Get the pagination information from the response headers | |
// Wrap Backbone.sync to save the pagination header on the response object. | |
Backbone.sync_with_pagination = function(method, model, success, error) { | |
var success_with_pagination = function(resp, status, xhr) { | |
resp.next_page = xhr.getResponseHeader('X-Next-Page'); | |
return success(resp); | |
} | |
return Backbone.sync_without_pagination(method, model, success_with_pagination, error); | |
}; |