Skip to content

Instantly share code, notes, and snippets.

@datenimperator
datenimperator / Gemfile
Created September 7, 2012 18:55
Sinatra, sprockets, compass, bootstrap-sass playing together
source :rubygems
gem 'shotgun', :group=>:development
gem 'rack-cache'
gem 'sinatra', :require => 'sinatra/base'
gem 'sinatra-support'
gem 'haml'
@koseki
koseki / bingchat-ime-fix.user.js
Last active October 16, 2023 00:29
macOS の Edge で Bing chat を使うと日本語入力確定時に勝手に送信されてしまう問題に対応する userscript
// ==UserScript==
// @name Bing Chat IME fix
// @namespace https://gist.github.com/koseki/d377f8f2e6df6655a1e160a4e03421d1
// @version 0.4
// @description macOS の Edge で Bing chat を使うと日本語入力確定時に勝手に送信されてしまう問題の対応です
// @author koseki
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @match https://www.bing.com/*
// @grant none
// ==/UserScript==

Atomコードリーディングメモ

ビルド方法

script/build

起動したらsrc/window-bootstrap.coffeeが起動時間のログを出してるので、そいつをgrepすると/src/broweser/atom-application.coffee が引っかかる。

src/broweser/atom-application.coffee は、 src/browser/main.coffee に呼ばれている

@repeatedly
repeatedly / d_master.md
Last active June 8, 2023 06:20
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@xl1
xl1 / gist:8651716
Last active October 24, 2022 16:39
CSS Regions で計算をする

CSS Regions で計算をする

検証環境

Google Chrome 34.0.1797.2 (Official Build 246002) dev-m
OS  Windows 
Blink 537.36 (@165430)
enable-experimental-web-platform-features フラグ オン
@chriseppstein
chriseppstein / _grid-system.scss
Created August 22, 2011 17:43
Building Responsive Layouts with Sass
@import "compass/utilities/general/clearfix";
$gutter-width: 10px; // All grids systems have the same gutter width
$float-direction: left;
$left-gutter-width: ceil($gutter-width / 2) !default;
$right-gutter-width: $gutter-width - $left-gutter-width !default;
$base-line-height: 21px;
$show-grid-background: false;
@mixin centered {
@mikemurray
mikemurray / Gruntfile.js
Created July 26, 2013 22:02
Gruntfile for PHP and LESS with livereloading
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
php: {
dev: {
options: {
hostname: '127.0.0.1',
@jessykate
jessykate / Jekyll nd Octopress Liquid tag for MathJax.rb
Created February 18, 2011 23:37
A simple liquid tag for Jekyll/Octopress that converts {% m %} and {% em %} into inline math, and {% math %} and {% endmath %} into block equations, by replacing with the appropriate MathJax script tags.
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
end
end
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
end
@orzccc
orzccc / devise.ja.yml
Created July 13, 2012 10:04 — forked from yhara/devise.ja.yml
Japanese locale file for "Devise" (2.1.2) http://github.com/plataformatec/devise/wiki/I18n
ja:
errors:
messages:
expired: "の期限が切れましたので、新しくリクエストしてください"
# expired: "has expired, please request a new one"
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みですのでログインしてください"
# already_confirmed: "was already confirmed, please try signing in"
not_locked: "は凍結されていません"
@koseki
koseki / sendgmail.rb
Created March 27, 2009 16:59
rubyで日本語のメール送信
# Send Japanese mail using Gmail SMTP server. You need tlsmail.
# $ sudo gem install tlsmail
require "rubygems"
require "tlsmail"
require "nkf"
require "net/smtp"
def sendgmail(from, to, subject, body, user, pass, host = "smtp.gmail.com", port = 587)
body = <<EOT