This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // store/index.js | |
| const createStore = () => { | |
| return new Vuex.Store({ | |
| state: { | |
| isNewHighScore: false, | |
| bgSong: {} | |
| }, | |
| mutations: { | |
| setIsNewHighScore(state) { | |
| state.isNewHighScore = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puts "Hello!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'gmail' | |
| require 'chatwork' | |
| require './click_timecard.rb' | |
| ChatWork.api_key = "CHATWORKのAPIキー" | |
| def chat(text) | |
| ChatWork::Message.create( room_id: "xxxxxxx", body: text ) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // click count | |
| jQuery(function($) { | |
| var _thisUrl = $(location).attr('href'); | |
| $.each($('a,input:image,input:submit'), function() { | |
| var _thisId = $(this).closest("[id]").attr("id"); | |
| var _thisLink = $(this).attr('href'); | |
| $(this).click(function() { | |
| ga('send', 'event', _thisUrl, _thisId, _thisLink); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on run {input, parameters} | |
| tell application "Terminal" | |
| activate | |
| do script "cd /path/to/the/ruby/file && ruby do_that.rb && open "http://google.com" && exit" | |
| end tell | |
| return input | |
| end run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function diffDay(y,m,d) { | |
| var diff = Math.floor((new Date(y,m-1,d) - new Date()) / 86400000) + 1; | |
| document.getElementById("count_down_image").innerHTML = '<img src="' + diff + '_days_left.png" />'; | |
| } | |
| diffDay(2013,12,31); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'whois' | |
| def get_whois_info(domains) | |
| domains.each do |domain| | |
| r = Whois::query(domain) | |
| t = r.technical_contacts | |
| begin | |
| puts "#{domain}, #{t[0].email}, #{t[0].name}" | |
| rescue => e | |
| puts "#{domain}, #{e}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/local/ruby | |
| # -*- encoding: utf-8 -*- | |
| require 'uri' | |
| def find_matched(arr, reg, reg2) | |
| puts "検索文字列1:" + reg | |
| puts "検索文字列2:" + reg2 | |
| arr.each do |file_name| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'gmail' | |
| require 'date' | |
| def fetch_attachmets(id, pass, label_name, from_date) | |
| dir_name = "#{Dir.pwd}/#{Date.today}" | |
| Dir.mkdir(dir_name) unless File.exists?(dir_name) | |
| begin | |
| Gmail.connect(id, pass) do |gmail| | |
| puts gmail.logged_in? ? "login OK" : "NOT Logged in!!!!" | |
| puts "Checking mails after #{from_date}..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'uri' | |
| def find_html(img_name, html_arr) | |
| img_basename = File.basename(img_name) | |
| html_arr.each do |file_name| | |
| htmlname = "http://www." + File.dirname(file_name) + "/" + File.basename(file_name) | |
| open(file_name) do |f| | |
| src = f.read | |
| if /(#{img_basename})/ =~ src | |
| puts "#{htmlname}, #{img_name}" |
NewerOlder