View gist:c5b8f60044de747015fe8df446bb862e
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
=LET(LX, LAMBDA(X, A, BITXOR(X, BITLSHIFT(BITAND(X, 2^(32-A)-1), A))), RX, LAMBDA(X, A, BITXOR(X, BITRSHIFT(X, A))), LX(RX(LX(input, 13), 17), 5)) |
View .htaccess
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ dispatch.cgi/$1 [QSA,L] |
View Cargo.toml
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
[package] | |
name = "chacha" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
"chacha20poly1305" = "0.10.1" |
View mlogjs.ts
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
// https://mlogjs.github.io/mlogjs/editor.html | |
const pid = Vars.thisx * 10000 + Vars.thisy * 10; | |
const flagGo = pid; | |
// const flagRepair = pid + 1; | |
unitBind(Units.mega); | |
const [, , , core] = unitLocate.building({ | |
group: "core", | |
enemy: false, | |
}); | |
while (true) { |
View .gitconfig
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
[alias] | |
begin = "!f(){ c=`git branch --show-current`; git switch -c $1; git commit --allow-empty -m \"$2\"; git push --set-upstream origin $1; gh pr create -a @me -b \"\" --draft --base $c -t \"$2\"; }; f" | |
pushtag = "!f(){ git tag -a -f $1 -m \"$2\"; git push -f origin $1 ; }; f" | |
sync = "fetch --prune --tags -f" |
View autoscroll_after_viewed.js
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 Auto Scroll After Viewed | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Click 'Viewed' checkbox easier. | |
// @author kuboon | |
// @match https://github.com/*/files | |
// @icon https://www.google.com/s2/favicons?domain=github.com&sz=256 | |
// @grant none | |
// ==/UserScript== |
View Dockerfile
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
# https://hub.docker.com/_/microsoft-vscode-devcontainers | |
FROM mcr.microsoft.com/vscode/devcontainers/base:0-ubuntu-21.04 | |
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | |
&& apt-get -y install --no-install-recommends fish | |
RUN chsh -s /usr/bin/fish vscode | |
USER vscode | |
SHELL ["/usr/bin/fish", "-l", "-c"] | |
# http://asdf-vm.com/guide/getting-started.html#_3-install-asdf |
View prepare_db.rb
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
RSpec.shared_context 'prepare db' do | |
def records | |
raise 'caller should define' | |
end | |
before :all do | |
::ActiveRecord::Base.connection.begin_transaction(joinable: false) | |
records | |
end | |
after :all do | |
::ActiveRecord::Base.connection.rollback_transaction |
View webrick_sample.rb
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
require 'webrick' | |
require 'cgi' | |
s = WEBrick::HTTPServer.new( | |
:Port => 8000, | |
:HTTPVersion => WEBrick::HTTPVersion.new('1.1'), | |
:AccessLog => [[open(IO::NULL, 'w'), '']] # アクセスログを出力しない | |
) | |
s.mount_proc('/') do |req, res| |
View gcp_start_stop
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: light-gray; icon-glyph: magic; | |
async function accessToken(){ | |
const env = { | |
CLIENT_ID: "000000000.apps.googleusercontent.com", | |
CLIENT_SECRET: "xxxxxxx", | |
REFRESH_TOKEN: "1//xxxxxxxx" | |
} | |
const project = "myproject" |
NewerOlder