This file contains 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
#!/usr/bin/env bash | |
# log file | |
exec 2>&1 | |
exec 1>~/startup.log | |
# install ansible | |
sudo apt update -y \ | |
&& sudo apt upgrade -y \ | |
&& sudo apt install -y software-properties-common \ |
This file contains 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 $a(e){return e.tagName=='A'?e:$a(e.parentNode)}document.querySelectorAll('[data-testid~="tweet"] div+div a img').forEach(i=>{a=$a(i);a.href=i.src.replace(/(?:\?.+)?$/,'?format=png&name=large');a.style.zIndex=1;a.replaceWith(a.cloneNode(true))}) |
This file contains 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
namespace DynamicSubClass | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
public class ParentClass |
This file contains 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
// ==UserScript== | |
// @name NicoVideo to Tumblr (nicovideo) | |
// @namespace https://u.chimata.org/ | |
// @version 0.1 | |
// @description show `Share Tumblr` button on nicovideo.jp | |
// @author You | |
// @match https://*.nicovideo.jp/watch/* | |
// @grant none | |
// ==/UserScript== |
This file contains 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 dep --description 'run golang-dep at symlink path instead of origin' | |
set -l current (pwd) | |
set -l work $current | |
set -l phome /mnt/d/Users/Private | |
set -l ghqroot (git config -l | sed -n /^ghq.root/s/~/$phome/p | awk -F= '{print $2}') | |
for x in $ghqroot; | |
set work (string replace -r "^$x" $GOPATH/src $work); | |
end | |
sh -c "cd $work && dep $argv" | |
end |
This file contains 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
MIT License | |
Copyright (c) 2018 Uchi (/ɯ̹t͡ɕʲi/) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains 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 dep --description 'run golang-dep at symlink path instead of origin' | |
set -l current (pwd) | |
set -l work $current | |
set -l ghqroot (git config -l | sed -n /^ghq.root/s/~/(string replace -a / \\/ $HOME)/p | awk -F= '{print $2}') | |
for x in $ghqroot; | |
set work (string replace -r "^$x" $GOPATH/src $work); | |
end | |
sh -c "cd $work && dep $argv" | |
end |
This file contains 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
l=console.log;o=414209763;r=Math.sqrt(o);for(i=2;i<=r&&i<=o;){o%i==0?(o/=i,l(i)):i++}if(o!=1)l(o) | |
// 0.042s |
This file contains 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
# chperl - plenv local <version> && plenv rehash | |
chperl() { | |
# usage: chperl <perl_version> | |
_VERSION=$1 | |
plenv local $_VERSION && plenv rehash | |
} |
This file contains 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
var system = require('system'); | |
var page = require('webpage').create(); | |
var timezone = +9 * 60 * 60 * 1000; | |
if (system.args.length === 1) { | |
console.log('Try to pass one url that you want to capture!'); | |
phantom.exit(); | |
} else { | |
console.log('start capturing: ' + system.args[1]); |
NewerOlder