Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name
// @namespace userjs.com.cosmio.pastak
// @description
// @include https://student.iimc.kyoto-u.ac.jp/iwproxy/KULASIS/student/la/timeslot/timeslot_list
// @include https://student.iimc.kyoto-u.ac.jp/iwproxy/KULASIS/student/la/entry/*
// ==/UserScript==
(function(){
var classLinks = document.querySelectorAll('td.timetable_filled a:not([title="削除"]):not([title="授業を追加"])');
document.addEventListener('contextmenu', function (e) {
var port = chrome.extension.connect();
var type = 'default';
if (e.target.tagName == 'A'){
type = 'link';
}
var url = e.target.href || '';
port.postMessage({
message : 'create_context_menu',
ConnectMessenger.bind('create_context_menu', function(event, data, port) {
chrome.contextMenus.removeAll();
if(data.type == 'default'){
chrome.contextMenus.create({
'title':'default menu',
'contexts':["page", "frame", "editable", "image", "video", "audio"],
'onclick':function(info, tab) {
alert('default');
}
});

東京旅行で行きたいとこメモ

この中から適当に選んで適当に行きたい

ポイントを繋いで移動しまくっても良いけど、エリアを1つ決めて街ブラするとかもありかもしんない (行きたい順に並べ直した)

  • 中野ブロードウェイって場所が気になる
  • ヴィレッジヴァンガード下北沢店
    • モテキとかで見た
@pastak
pastak / 9threview.md
Last active December 19, 2015 19:59

Webページで学ぶJavaScript 2013 第9回 復習用

Pasta-K @ KMC

tyageくんが忙しそうだったので、急遽pastakが担当することになりました。勉強会中は資料とかなしに進めたので、ここに復習用にまとめておきます。

念のため過去の資料は http://slideshare.net/KMC_JP にあります。

var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://code.jquery.com/jquery-2.0.3.min.js';
document.body.appendChild(s);
var timer=setInterval(function(){
if($){
clearInterval(timer);
/*jQuery読み込んでたら($関数が存在すれば)以下を実行*/
$('td>a');
}
@pastak
pastak / a.c
Last active December 19, 2015 15:29
//フィボナッチ数かつ素数を小さいのから10個出力
#include <stdio.h>
int main(void){
int count = 0;
int tmp[2] = {1,1};
int n,i,j;
int is_prime;
for(i = 0;count < 10;i++){
// ==UserScript==
// @name PresserSelectFeedByNumber
// @namespace userjs.com.cosmio.pastak
// @description Presserにショートカットキーとかを追加します。
// @include http://feedpresser.com/*
// ==/UserScript==
/** 使い方 **
* a:前のフィードの一覧を表示
* s:次のフィードの一覧を表示
私 わたし 私 名詞 6 普通名詞 1 * 0 * 0 "代表表記:私/わたし 漢字読み:訓 カテゴリ:人"
は は は 助詞 9 副助詞 2 * 0 * 0 NIL
京都 きょうと 京都 名詞 6 地名 4 * 0 * 0 "代表表記:京都/きょうと 地名:日本:府"
@ 京都 きょうと 京都 名詞 6 地名 4 * 0 * 0 "代表表記:京都/きょうと 地名:日本:京都府:市"
国立 こくりつ 国立 名詞 6 普通名詞 1 * 0 * 0 "代表表記:国立/こくりつ カテゴリ:抽象物 ドメイン:教育・学習;政治"
@ 国立 くにたち 国立 名詞 6 地名 4 * 0 * 0 "代表表記:国立/くにたち 地名:日本:東京都:市"
近代 きんだい 近代 名詞 6 普通名詞 1 * 0 * 0 "代表表記:近代/きんだい カテゴリ:時間"
美術 びじゅつ 美術 名詞 6 普通名詞 1 * 0 * 0 "代表表記:美術/びじゅつ カテゴリ:抽象物 ドメイン:文化・芸術"
館 かん 館 名詞 6 普通名詞 1 * 0 * 0 "代表表記:館/かん 漢字読み:音 カテゴリ:場所-施設"
の の の 助詞 9 接続助詞 3 * 0 * 0 NIL
class Purin
def initialize (hp,attack,defence)
@hp = hp
@attack = attack
@defence = defence
end
attr_accessor :hp
attr_accessor :attack
attr_accessor :defence