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
| // | |
| // Bookmarklet | |
| // | |
| // Open up the corresponding translation in Japanese or original English article | |
| // in a new window for http://techcrunch.com and http://jp.techcrunch.com | |
| // | |
| // New format: | |
| // Use this regular expression test site: https://regex101.com/ | |
| // | |
| // http://jp.techcrunch.com/2017/12/19/2017-12-18-bmw-teams-up-with-solid-power-to-develop-solid-state-batteries-for-cars/ |
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
| // Euler Project | |
| // Problem 45: https://projecteuler.net/problem=45 | |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { |
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
| package main | |
| // Euler Project #50: http://projecteuler.net/problem=50 | |
| import ( | |
| "fmt" | |
| "math" | |
| "runtime" | |
| ) |
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
| // | |
| // Bookmarklet | |
| // | |
| // Open up the stat page for WordPress. | |
| // You need to be logged in to WordPress.com, and have permission. | |
| // | |
| // | |
| javascript:(function(){ | |
| function getFirstElementByClass(matchClass) { |
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
| // | |
| // Bookmarklet | |
| // | |
| // Open up the corresponding translation in Japanese or original English article | |
| // in a new window for http://techcrunch.com and http://jp.techcrunch.com | |
| // | |
| javascript:(function(){ | |
| _url=location.href; | |
| if(_url.indexOf("http://jp.techcrunch") !== -1) { | |
| _new_url = _url.replace("http://jp.", "https://").replace(/201[0-9\/]+/, ""); |
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
| $related_tags = {} | |
| qestion_tags = [ | |
| %w(ruby rails ide), | |
| %w(rails db), | |
| %w(ruby rails db mysql), | |
| %w(mysql sql), | |
| %w(rails mysql), | |
| %w(ruby rails postgres) | |
| ] |
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(){ | |
| var canvas = $("#dragon")[0], | |
| ctx = canvas.getContext("2d"); | |
| $.extend(ctx, { | |
| strokeStyle: "rgb(255, 127, 0)", | |
| lineWidth: 1 | |
| }); | |
| var Turtle = function (x, y, vector) { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <style> | |
| body { | |
| background: white; | |
| text-align: center; | |
| padding: 20px; | |
| font-family: Georgia, serif; |
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 'open-uri' | |
| require 'json' | |
| def facebook_api | |
| @facebook_api ||= "https://graph.facebook.com/?ids=" | |
| end | |
| def retrieve_numbe_of_likes(url) | |
| resp = open(facebook_api+url).read | |
| JSON.parse(resp)[url]["shares"] |
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
| # | |
| # Magic matrix solver | |
| # Ken Nishimura 2011/9/14 | |
| # | |
| # Solver.new(Matrix.new((1..9))).solve yeilds: | |
| # | |
| # |8|1|6| | |
| # |3|5|7| | |
| # |4|9|2| | |
| # |
NewerOlder