Skip to content

Instantly share code, notes, and snippets.

@wakaba
wakaba / a.json
Last active April 21, 2024 02:35
{
"success": true,
"result": {
},
"type": "packref",
"source": {
"type": "ckan",
"url": "https://data.gsj.jp/gkan/dataset/gsj_map_1233"
}
}
@wakaba
wakaba / ss.js
Last active February 21, 2024 05:21
async function _capture (e) {
const stream = await navigator.mediaDevices.getDisplayMedia ({
video: {
cursor: "never",
},
audio: false,
displaySurface: "browser",
preferCurrentTab: true,
selfBrowserSurface: "include",
});
You are granted a license to use, reproduce, and create derivative
works of these files.
#!/usr/bin/perl
open $file, '>', '.travis-merge';
print $file q{#!/bin/sh
curl -s -S -L -o travis_after_all.py https://gist.githubusercontent.com/wakaba/9970857/raw/travis_after_all.py && \
python travis_after_all.py && \
(ls .to_export_back || echo "BUILD_LEADER=YES BUILD_AGGREGATE_STATUS=others_succeeded" > .to_export_back)
export DUMMY=0 $(cat .to_export_back)
echo "BUILD_LEADER = $BUILD_LEADER, BUILD_AGGREGATE_STATUS = $BUILD_AGGREGATE_STATUS, TRAVIS_BRANCH = $TRAVIS_BRANCH, TRAVIS_COMMIT = $TRAVIS_COMMIT"
if [ "$BUILD_LEADER" = "YES" ]; then
#!/usr/bin/perl
open $file, '>', '.travis-merge';
print $file q{#!/bin/sh
if [ "$TRAVIS_BRANCH" = "staging" ] || [ "$TRAVIS_BRANCH" = "nightly" ] || [ "$TRAVIS_BRANCH" = "nightlywp" ]; then
echo "Merge $TRAVIS_BRANCH ($TRAVIS_COMMIT) into master..."
git config --global user.email "merger@travis.test"
git config --global user.name "Travis Merger"
git config --global url.https://$TRAVISMERGER_GH_TOKEN:@github.com/.pushInsteadOf https://github.com/
if [ -s "$(git rev-parse --git-dir)/shallow" ]; then
@wakaba
wakaba / bookmarklet
Last active February 16, 2017 07:34
javascript:var s=document.createElement('script');s.src="https://gist.githack.com/wakaba/b90f120b2617afe5c2fc4d08d84e801f/raw/script.js";document.body.appendChild(s);void(0)
@wakaba
wakaba / repos.txt
Last active October 15, 2016 06:43
We couldn’t find that file to show.

😃 :haha:

use strict;
use warnings;
$ENV{LANG} = 'C';
my @host = qw(
www.google.com
mail.google.com
github.com
gist.github.com
gist.githubusercontent.com
@wakaba
wakaba / htmldiff.pl
Last active December 31, 2015 05:39
# XXX This is a very early prototype.
use strict;
use warnings;
use Path::Class;
use lib glob file (__FILE__)->dir->subdir('modules/*/lib');
use Web::DOM::Document;
use Algorithm::Diff qw(sdiff);