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
| javascript:(function(){var url=location.href;if(url.startsWith("https://duckduckgo.com")){var query=location.search;var googleURL="https://www.google.com/search"+query;window.open(googleURL)};})(); |
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
| javascript:(function() { | |
| var project = 'YOUR_PROJECT_NAME'; | |
| var url = `https://scrapbox.io/${project}/`; | |
| var gyazoUrl = location.href; | |
| var ocrText = document.getElementsByClassName('ocr-desc-text')[0].innerText; | |
| var title = document.getElementsByClassName('image-desc-display')[0].innerText; | |
| var lines = [`[${gyazoUrl}]`, '', ocrText, '']; | |
| var body = encodeURIComponent(lines.join('\n')); | |
| window.open(url + encodeURIComponent(title.trim()) + '?body=' + body) | |
| } |
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/env ruby | |
| require "open3" | |
| %w[.com .jp].map { |d| "#{ARGV[0]}#{d}" }.each do |domain| | |
| out, = Open3.capture3("whois #{domain}") | |
| puts "#{domain} is #{out.downcase.include?("no match")}" | |
| 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
| import Foundation | |
| struct Person { | |
| var number: Int | |
| var name: String | |
| } | |
| let persons = [Person(number: 1, name: "John"), |
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
| #!/bin/bash | |
| ROUTER_IP='xxx.xxx.xxx.xxx' | |
| HTML=`curl -u user:password -v "http://${ROUTER_IP}/index.cgi/reboot_main"` | |
| SESSION_ID=`echo "${HTML}" | grep SESSION_ID| head -1 | sed -e "s/.*value='\(.*\)'.*$/\1/"` | |
| curl -u user:password -v -o /dev/null "http://${ROUTER_IP}/index.cgi/reboot_main_set" --data "UPDATE_BUTTON=Reboot&SESSION_ID=${SESSION_ID}" |
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
| let mapleader = "," | |
| let hintcharacters = "abcdefghjkmnopqrstuvwxyz" | |
| let locale = "jp" | |
| command g tabnew google | |
| unmap s | |
| map ; : | |
| map <C-d> scrollPageDown | |
| map <C-b> scrollFullPageUp |