$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
// ==UserScript== | |
// @name show meta | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description show meta what we want | |
// @author me | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
#!/usr/bin/perl | |
# This script is made to show graphs with git commit time made on workweek vs weekend | |
# | |
# The desription of this script and results of its usage is avaliable at: | |
# https://ivan.bessarabov.com/blog/famous-programmers-work-time-part-2-workweek-vs-weekend | |
# | |
# usage: | |
# | |
# git log --author="Sebastian Riedel" --format="%H %ai" | perl script.pl |
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }' | |
// ==UserScript== | |
// @name Add New Issue Template Link | |
// @namespace https://github.com/akinov | |
// @version 0.3 | |
// @description New Issue Templateを簡単に | |
// @author akinov | |
// @match https://github.com/*/issues* | |
// @grant none | |
/* load jQuery */ | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js |
# encoding: UTF-8 | |
Earthquake.once do | |
module TwitterOAuth | |
class Client | |
def search_queries(q, **options) | |
q = URI.encode_www_form_component(q) | |
options = URI.encode_www_form(options) | |
get("/search/tweets.json?q=#{q}&#{options}") | |
end | |
end |
var getPosition = function (options) { | |
return new Promise(function (resolve, reject) { | |
navigator.geolocation.getCurrentPosition(resolve, reject, options); | |
}); | |
} | |
getPosition() | |
.then((position) => { | |
console.log(position); | |
}) |
# encoding: UTF-8 | |
Earthquake.once do | |
module TwitterOAuth | |
class Client | |
def favorites_list(user, **options) | |
options = URI.encode_www_form(options) | |
get("/favorites/list.json?screen_name=#{user}&#{options}") | |
end | |
end | |
end |
module HelperExamplesExtensions | |
# Copy of stub_template from view specs | |
# @see RSpec::Rails::ViewExampleGroup::ExampleMethods#stub_template | |
def stub_template(hash) | |
view.view_paths.unshift(ActionView::FixtureResolver.new(hash)) | |
end | |
end | |
RSpec.configure do |config| | |
config.include HelperExamplesExtensions, type: :helper |
source 'https://rubygems.org' | |
gem 'earthquake', | |
git: 'https://github.com/kaosf/earthquake', | |
branch: 'master' | |
# SHA1: b845de4c363aa3df7820f049d36aae210969d1d2 | |
gem 'twitter-stream', | |
git: 'https://github.com/kaosf/twitter-stream', | |
branch: 'master' |