Skip to content

Instantly share code, notes, and snippets.

View siakas's full-sized avatar

Sanshiroh SAKAI siakas

View GitHub Profile
@siakas
siakas / no_auto_translate_code_pre_elements.js
Created June 2, 2023 00:59
Tampermonkey 用スクリプト:pre 要素と code 要素の翻訳防止用スクリプトです
// ==UserScript==
// @name Code and Pre Element Translator Blocker
// @namespace http://tampermonkey.net/
// @version 0.1
// @description add translate='no' to every code and pre element
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
@siakas
siakas / jquery.plugin.simple.template.js
Created February 24, 2017 02:13
jQuery プラグイン作成用テンプレート(シンプル版)
/*!*
* jQuery ******
* Version 0.0.1
*
* 最もシンプルな構造のプラグインです。誰でも読めるようになっています。ここには簡単な機能説明を書きます
*/
(function( $, window, document ) {
'use strict';
// メタ情報
@siakas
siakas / jquery.plugin.template.js
Last active February 24, 2017 02:14
【利用停止】jQuery プラグインを自作する際のテンプレート
(function( $ ) {
'use strict';
// 名前空間の定義
const namespace = 'pluginName';
$.fn[namespace] = function(options) {
// 受け取った要素を変数に退避
const elements = this;
@siakas
siakas / js-pattern.js
Last active January 23, 2017 12:05
JavaScript の必須パターン(『JavaScriptパターン』2章から)
// for ループでは配列の長さをキャッシュしておく
// ------------------------------------------------
// Bad
for (let i = 0; i < array.length; i++) {
// ...
}
// Good
for (let i = 0, max = array.length; i < max; i++) {
// ...
@siakas
siakas / keybindings.json
Last active December 22, 2016 03:39
VSCode ユーザー設定
// 既定値を上書きするには、このファイル内にキー バインドを挿入します
[
{
"key": "ctrl+,",
"command": "editor.emmet.action.expandAbbreviation",
"when": "editorTextFocus && !editorHasMultipleSelections && !editorHasSelection && !editorReadonly && !editorTabMovesFocus"
}
]
@siakas
siakas / _layout.pug
Last active March 3, 2019 18:41
Gulp+Pug+JSON でメタ管理&呼び出し
- var baseUrl = 'https://www.dokaben.co.jp'
block setVar
- var pageId = 'top'
doctype html
html(lang=lang)
head
meta(charset='UTF-8')
meta(name='viewport', content='width=device-width, initial-scale=1')
@siakas
siakas / TextStyles.plist
Last active August 29, 2015 14:23
【Mac OS X 10.8 向け】Helvetica に変更された iTunes 12 のスタイルが気に入らないので、システムフォントを適用するように変更
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>100</key>
<dict>
<key>- loc hint -</key>
<string>System Font</string>
<key>font</key>
<string>_System</string>
{
"draw_white_space": "all",
"ignored_packages": ["Vintage"],
"word_wrap": true,
"trim_automatic_white_space": false,
// テーマ
// -------------------------------------------------
"theme": "Soda Dark.sublime-theme",
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function(grunt) {
// パッケージファイルの指定
var pkg = grunt.file.readJSON('package.json');