Skip to content

Instantly share code, notes, and snippets.

View syuichi-tsuji's full-sized avatar

辻 修一 syuichi-tsuji

View GitHub Profile

Github provides no facility to do this via the UI. This is sad, because it would be extremely useful in order to draft something before publishing it. It would also be trivial for them to implement. Never mind; here's how to do it manually:

  1. Get the "Clone this Gist" text from the left-hand side of the private Gist, e.g. https://gist.github.com/b9cc265982870c091a1e.git, and extract the ID b9cc265982870c091a1e.
  2. Go to https://gist.github.com/ and create a dummy new public Gist.
  3. Get the "Clone this Gist" text from the left-hand side, e.g. https://gist.github.com/8270253.git, and extract the ID 8270253.
  4. git clone [email protected]:b9cc265982870c091a1e tmp-dir && cd tmp-dir && git push -f [email protected]:8270253.git
@syuichi-tsuji
syuichi-tsuji / 0_reuse_code.js
Created November 29, 2015 04:33
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
@syuichi-tsuji
syuichi-tsuji / 2015-11-20.md
Created November 20, 2015 04:00 — forked from azu/2015-11-20.md
今週のJavaScriptまとめ @ 2015年11月20日

今週のニュース

何か色々あったのでまとめ

Bower

rails-assets(Bowerをgem経由で使うやつ)が2016年3月31日で終了する宣言を出しました。

@syuichi-tsuji
syuichi-tsuji / gist:ea387588c834bcc23c96
Last active February 23, 2018 12:51 — forked from violetyk/gist:5343883
スクロールイベント 上下方向の判定
var start_pos = 0;
$(window).scroll(function(e){
var current_pos = $(this).scrollTop();
if (current_pos > start_pos) {
console.log('down');
} else {
console.log('up');
}
start_pos = current_pos;
});
●SAアソシエイト試験(最終更新日: 2014 年 1 月)サンプルより私的メモ
 ・『S3 に保管したコンテンツを、S3には直接アクセスできないようにしつつCloudFront を使って配信する』
  → CloudFront 用にオリジナルアクセスアイデンティティ(OAI)を作成し
    バケットの中のオブジェクトにOAI のアクセス権を付与する
 ・『VPC 内でElastic IP アドレスが関連付けられたEC2 インスタンスを停止して起動』
  → Elastic IP アドレスの関連付けは解除されない
<?php
// {app}/config/database.php
class DATABASE_CONFIG
{
var $default = array(
// デフォルトのDB設定...
);
// https://github.com/cakephp/datasources を導入してArraySource用のDB設定を追加します。