Skip to content

Instantly share code, notes, and snippets.

View toshimaru's full-sized avatar

Toshimaru toshimaru

View GitHub Profile
@toshimaru
toshimaru / install-mysql5.7-circleci.sh
Last active May 3, 2018 08:32 — forked from kimh/install-mysql5.7-circleci.sh
Install MySQL 5.7 non-interactively in CircleCI
#!/bin/bash
set -x
set -e
export DEBIAN_FRONTEND=noninteractive
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
echo mysql-apt-config mysql-apt-config/select-product select Apply | sudo debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-connector-python select none | sudo debconf-set-selections
<html>
<head>
<title>data-attribute test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="tgt" data-msg='my message is here!'>
<p>Foo</p>
<p>Bar</p>
</div>

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@toshimaru
toshimaru / jquery-scroll-bottom.js
Last active July 21, 2024 00:02
Detect the scrolling to bottom of the page using jQuery.
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
}
});
@toshimaru
toshimaru / scroll-to-element.js
Created July 12, 2013 09:03
Scroll to the particular element using jQuery.
$('.info').on('click', function(){
$('html, body').animate({
scrollTop: $(this).offset().top
}, 500);
});

##人への関心:誰と、どのくらいの時間会っているかを把握しているか?

  • 情報はいうまでもなく、金もまた人についてくることを知っている。

  • 大切な人に会うための時間は、ほかの予定を変えてでも捻出する。

  • 待ち合わせの場所には、常に約束の時間より余裕をもって到着する。

  • 勉強会や交流会への参加は、会の内容より、参加者の顔ぶれで決める。

desc 'Check links for site already running on localhost:4000'
task :check_links do
begin
require 'anemone'
root = 'http://localhost:4000/'
Anemone.crawl(root, :discard_page_bodies => true) do |anemone|
anemone.after_crawl do |pagestore|
broken_links = Hash.new { |h, k| h[k] = [] }
pagestore.each_value do |page|
if page.code != 200
@toshimaru
toshimaru / dgsync.bat
Created April 18, 2013 18:37
[Windows] sync amazon S3 with DragonDisk Command line sync tool. http://www.dragondisk.com/download-amazon-s3-client-google-cloud-storage-client.html
SET DGTOOLS_ACCESS_KEY=XXXXXXXXXXXXX
SET DGTOOLS_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXX
dgsync -v --ssl --dont-delete --endpoint "s3-ap-northeast-1.amazonaws.com" "C:\Users\toshi\picture" "s3://your-s3-bucket/picture"

Usage

 $('#id').trace()

.find('.class').trace();

#/bin/sh
for file in `ls | egrep '[0-9A-z、-◯ぁ-んァ-ヶ亜-腕弌-熙]'`; do
rename_file=`echo ${file} | sed -e 's/[0-9A-z、-◯ぁ-んァ-ヶ亜-腕弌-熙]//g'`
mv $file $rename_file
done