Skip to content

Instantly share code, notes, and snippets.

View wata's full-sized avatar

Wataru Nagasawa wata

View GitHub Profile
use JSON;
use Furl::HTTP;
my $ua = Furl::HTTP->new;
my (undef, $code, undef, undef, $body) = $ua->get('http://localhost:10041/d/status');
my $status = decode_json($body);
print $status->{uptime};
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Perl Search</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="format-detection" content="telephone=no" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<style>
html, body { margin:0; background-color:#DAE0E5; word-break:break-all; }
use strict;
use warnings;
use 5.010;
use utf8;
use Time::Piece;
use Furl;
use JSON;
use Term::ReadKey qw/GetTerminalSize/;
my $id = '101763292'; # zeebratv
javascript:(function(){u=encodeURIComponent(location.href);window.open("https://twitter.com/#!/search/"+u);})();
@wata
wata / send_line_bookmarklet
Created December 21, 2012 07:51
Send URL to LINE app from Smartphone Browser.
javascript:(function(){u=encodeURIComponent(location.href);window.open("line://msg/text/"+document.title+' '+u);})();
@wata
wata / vagrant.json
Created May 21, 2013 04:11
ngx_pagespeed組み込みnginxを試すためのjson
{
"run_list": [
"yum::epel",
"iptables",
"nginx"
],
"nginx": {
"install_method": "source",
"source": {
"modules": [
@wata
wata / app.yaml
Last active December 26, 2015 12:09
GAE: app.yaml designed for serving a static site on Google App Engine (Python).
application: {{package.name}}
version: {{dashify package.version}}
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /robots.txt
static_files: robots.txt
@wata
wata / site.json
Created October 25, 2013 08:13
Website Basic Configuration
{
"title" : "",
"url" : "",
"keywords" : "",
"description" : "",
"copyright" : "",
"blog_url" : "",
"blog_rss" : "",
"support_url" : "",
"facebook_url" : "",

1. Storing the ftpdata to path/to/GIT_DIR

[master]
username=
password=
hostname=
remotepath=
gitftpignore=.gitftpignore