Skip to content

Instantly share code, notes, and snippets.

@mala
mala / covid19-twitter-research_01.md
Last active October 17, 2024 06:34
生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

更新履歴

2020-05-13 追記

@traviskaufman
traviskaufman / jasmine-this-vars.md
Last active January 4, 2025 16:49
Better Jasmine Tests With `this`

Better Jasmine Tests With this

On the Refinery29 Mobile Web Team, codenamed "Bicycle", all of our unit tests are written using Jasmine, an awesome BDD library written by Pivotal Labs. We recently switched how we set up data for tests from declaring and assigning to closures, to assigning properties to each test case's this object, and we've seen some awesome benefits from doing such.

The old way

Up until recently, a typical unit test for us looked something like this:

describe('views.Card', function() {
" filetype が typescript の場合にのみ動作する neocomplcache プラグイン
" jsx_complete.vim を参考にしてます.
" https://github.com/osyo-manga/neocomplcache-jsx/blob/master/autoload/neocomplcache/sources/jsx_complete.vim
let s:source = {
\ 'name': 'typescript_complete',
\ 'kind': 'ftplugin',
\ 'filetypes': { 'typescript': 1 },
\ }
@makotot
makotot / mocha_assertionlib_testem.md
Created October 31, 2012 13:40
mocha + assertion library + testem

mocha - testing JavaScript with Expect(, Chai) and testem

node.js, browser用のJSテストフレームワーク。

BDD, TDD, QUnitスタイルのいずれかでテストコードが書ける。

mochaにアサーションの機能は無いので、should.js,expect.js,chai.js等のアサーションライブラリを用いる。

doc

@Takazudo
Takazudo / androidViewport.js
Created January 10, 2011 08:09
some androids can't handle meta viewport width=number.
/*
There's <meta name="viewport" content="width=480" /> in html then...
*/
// handle Android's viewport
(function($, undefined){
$.browser.android = /android/i.test(navigator.userAgent);
if(!$.browser.android){