Skip to content

Instantly share code, notes, and snippets.

Best practices for building Vim plugins

2016-11-05 VimConf 2016

@philfreo
philfreo / _README.md
Last active April 8, 2018 06:42
Make Dash button play iTunes to AirPlay speakers

Uses a (basically free) Amazon Dash Button to play/pause your iTunes music over AirPlay speakers.

Requires OS X and an AirPlay compatible speaker (e.g. Apple TV or any speaker hooked up to AirPort Express).

  1. Install node-dash-button and follow the instructions to get your Dash Button's MAC address.
  2. Install node-applescript
  3. Tweak code as desired, filling in your button's MAC address, name of your AirPlay speakers, etc.
  4. Run via Terminal: node dash_buttons.js
@ytsuboi
ytsuboi / 2fa-cli.md
Last active July 2, 2021 05:26
GitHubの2段階認証を有効にした状態で、repositoryの操作をコマンドラインで行うためのメモ

二段階認証を有効にする方法

2段階認証を有効にする方法は適当にググってください。 たしか、ログインした状態で、右上のアイコンの右にある▼をクリック、Settings→Securityに「Two-factor authentication」という設定項目があるはずです。 Google Authenticatorなどの、RFC 6238 Time-Based One-Time Password Algorithmを搭載したトークン発生器を用意しておいてください。

ただし、二段階認証を有効にすると、コマンドラインでgit cloneしたり、push、pullなどの操作を行おうとすると、認証で蹴られるようになります。

二段階認証を有効にした場合のgitコマンドでの操作

二段階認証を有効にしたら、GitHubのウェブで、Personal Access Tokenを取得して、これを使います。 GitHubのCreating an access token for command-line useに書いてありますが、二段階認証を有効にしたときと同じく、ログインした状態で右上のアイコンの右にある▼をクリックし、「Personal access tokens」という項目でトークンの発行が可能です。

@jamestalmage
jamestalmage / How_Require_Extensions_Work.md
Last active February 28, 2024 18:22
Breakdown of How Require Extensions Work

Why

Doing require extensions correctly is essential, because:

  1. Users should be able to install multiple extensions in succession, and have them work together.
  2. Coverage tools like nyc need it to reliably supply coverage information that takes into account sourcemaps from upstream transforms.
  3. Because non-standard, un-predictable behavior causes hard to solve bugs, and major headaches for project maintainers.

What is a require extension anyways?

@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2024 12:47
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@ohanhi
ohanhi / frp.md
Last active December 23, 2022 13:06
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

Elixir/Mix入門
## 概要
- elixir / erlang vm へコンパイルされる言語。コンパイラ。
- mix / elixirのプロジェクト管理ツール。elixirインストール時に入る
```diff:aaaaaa
aaaa
```
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active April 2, 2024 20:18
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@mizchi
mizchi / フロントエンドを楽にするために.md
Last active December 14, 2023 11:57
フロントエンドを楽にするために

フロントエンドを楽にするために

Qiitaを支えたい技術 at 時雨祭

About

  • HN: mizchi
  • Qiitaの方からきました(入社半年たったらしい)
  • Reactオジサンはそろそろ飽きてきた
  • Angularに興味が無いのでこっちにきた
@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.