Skip to content

Instantly share code, notes, and snippets.

@cu39
cu39 / mouse-4-and-5-for-reloading.json
Created April 3, 2022 08:03
Safariでマウスボタン4/5をリロードボタンに設定するKarabiner-Elementsルール
{
"title": "マウスボタン4/5でリロード(Safari限定)",
"rules": [
{
"description": "マウスボタン4でリロード(Safari限定)",
"manipulators": [
{
"type": "basic",
"from": {
"pointing_button": "button4"
@cu39
cu39 / feedbro-locale-ja_JP.json
Created January 9, 2022 12:58
Feedbro Locale ja_JP 日本語ロケール
{
"meta": {
"manifest_version": 1,
"locale_version": "1.0",
"locale_name": "English",
"locale_type": "en_US",
"locale_last_updated": "2019-10-18 12:00:00 UTC",
"locale_author_name": "Nodetics",
"locale_author_email": "nodetics@gmail.com",
"locale_source_url": "https://nodetics.com/feedbro/"
@cu39
cu39 / .gitignore
Last active January 13, 2017 05:29
textlint-prh-regex-lookahead
node_modules/
@cu39
cu39 / four-parents.sh
Last active November 3, 2015 10:02
Create a git repo whose last commit has four parents
#!/bin/sh
GIT=$(which git)
TARGET_DIR="four-parents"
if [[ -d $TARGET_DIR ]]; then
echo $TARGET_DIR already exists.
exit 1
fi
% gem install jekyll -V
GET https://api.rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://api.rubygems.org/quick/Marshal.4.8/jekyll-2.0.2.gemspec.rz
302 Moved Temporarily
GET https://tokyo-m.rubygems.org/quick/Marshal.4.8/jekyll-2.0.2.gemspec.rz
504 Gateway Time-out
ERROR: Could not find a valid gem 'jekyll' (>= 0), here is why:
@cu39
cu39 / Gruntfile.coffee
Last active August 29, 2015 13:58
シンプルなWebサーバ+LivereloadだけのGruntfile ref: http://qiita.com/cu39/items/29a0322e7e86f616ee3c
"use strict"
# # Globbing
# for performance reasons we're only matching one level down:
# 'test/spec/{,*/}*.js'
# use this if you want to recursively match all subfolders:
# 'test/spec/**/*.js'
module.exports = (grunt) ->
@cu39
cu39 / dom_walkaround.jsx
Last active December 12, 2016 14:28
【InDesign】DocumentからスタートしてDocumentまで戻る【DOM散歩】 ref: http://qiita.com/cu39/items/3f8b857f2d03c7e6163e
var doc = app.activeDocument;$.writeln( doc ===
app.activeDocument // Document
.stories // Stories
.item(0) // Story
.paragraphs // Paragraphs
.item(0) // Paragraph
.parentTextFrames[0] // TextFrame (item() does not exist)
.parent // Page
.parent // Spread
.parent // Document
@cu39
cu39 / 0_reuse_code.js
Created March 20, 2014 16:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
% brew list | while read formula; do; brew unlink $formula && brew link $formula; done
Unlinking /usr/local/Cellar/a52dec/0.7.4... 0 links removed
Linking /usr/local/Cellar/a52dec/0.7.4... 9 symlinks created
Unlinking /usr/local/Cellar/ack/2.12... 0 links removed
Linking /usr/local/Cellar/ack/2.12... 2 symlinks created
Unlinking /usr/local/Cellar/apple-gcc42/4.2.1-5666.3... 0 links removed
Linking /usr/local/Cellar/apple-gcc42/4.2.1-5666.3... 21 symlinks created
Unlinking /usr/local/Cellar/atk/2.10.0... 101 links removed
Linking /usr/local/Cellar/atk/2.10.0... 102 symlinks created
Unlinking /usr/local/Cellar/autoconf/2.69... 4 links removed
@cu39
cu39 / config.js
Created February 9, 2014 10:37
Enable TeX and AsciiMath syntaxes with MathJax.
MathJax.Hub.Config({
config: [ "MMLorHTML.js" ],
jax: [ "input/AsciiMath", "input/TeX", "output/HTML-CSS", "output/NativeMML" ],
extensions: [ "asciimath2jax.js", "tex2jax.js", "mml2jax.js", "MathMenu.js", "MathZoom.js" ],
TeX: {
extensions: [ "AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js" ]
}
});