Skip to content

Instantly share code, notes, and snippets.

View uu59's full-sized avatar

uu59

View GitHub Profile
@uu59
uu59 / manifest.json
Last active December 17, 2015 11:49
Pixiv Header jama
{
"manifest_version": 2,
"name": "Pixiv Header jama",
"version": "1.0.0",
"description": "Remove Pixiv header if you are not logged in",
"permissions": [ "http://www.pixiv.net/*"],
"content_scripts": [
{
"matches": [ "http://www.pixiv.net/*"],
"js": ["remover.js"]
@uu59
uu59 / file0.rb
Created May 3, 2013 04:51
vagrantでユーザーを作ってパスワードも設定したいとき ref: http://qiita.com/items/141fecf6f5ed2d83ada0
myuser = "uu59"
user myuser do
username myuser
# ruby-shadowが必要とか言われてこけるのでいったんnilにする
#password "$6$salt1234$IjyVJemPr/rDex7jMj7.mfzJVRqJIgjG79ZKkknhLi4/P6OGc7GjWTVBRuqWmvH2hlZyfRXzO46tPAPRrzxne1"
#password "$1$salt1234$iNjm45hy75S/NffCgJVQX."
password nil
@uu59
uu59 / file0.rb
Created May 3, 2013 04:33
YUIなしでcssをminifyする ref: http://qiita.com/items/95cd753fa824e5d2890e
require "sass"
css = <<CSS
body {
color: red;
background-color: black;
}
img.dokuro {
display: inline-block;
require "time"
today = Time.now
#today = Time.parse('2013-04 07')
def to_calendar(time)
target = time.dup
def target.days
(1..31).map do |day|
@uu59
uu59 / a.html
Last active December 16, 2015 06:48
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
@uu59
uu59 / gist:5281350
Created March 31, 2013 17:23
bundle completion
__bundle() {
local cachefile="/tmp/__bundle_completion"
if [ ! -f $cachefile ];then
echo $(bundle -h | col -b | grep -o "bundle .*(1)" | sed 's/(1)//g' | sed 's/bundle //g') > $cachefile
fi
COMPREPLY=($(compgen -W "$(cat $cachefile)"))
}
complete -F __bundle bundle
# -- coding: utf-8
require "prime"
n=ARGV[0].to_i
Prime.each(n){|p| puts "#{n}=#{p}+#{n-p}" if Prime.prime?(n-p)}
@uu59
uu59 / config.json
Last active December 14, 2015 20:19
$ phantomjs ./ec2.js ./config.json
{
"t1.micro": 0.5, // 0.5 * 24 hours * 365 days / 12 month
"m1.small": 1
}
@uu59
uu59 / mita.rb
Created February 5, 2013 13:00
# -- coding: utf-8
require "rubygems"
require "grill"
Grill.implant <<-G
source :rubygems
gem "nokogiri"
gem "httpclient"
--- ./old.txt 2012-12-21 09:50:05.670254029 +0900
+++ ./new.txt 2012-12-21 09:50:20.078541511 +0900
@@ -1,9 +1,9 @@
Privacy Policy
-Effective date: August 30, 2012.
+Effective date: January 16, 2013
Welcome to Instagram ("Instagram," "we," "us" or "our"). Instagram provides a fast, beautiful and fun way for you to share media through our content-sharing platform. Just snap a photo, choose a filter to transform the look and feel, add comments (if you like) and share!
-Our Privacy Policy explains how we collect, use, share and protect information in relation to our mobile services, web site, and any software provided on or in connection with Instagram services (collectively, the "Service"), and your choices about the collection and use of your information.