Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
@XargonWan
XargonWan / japanese_locale_enabler.sh
Last active April 11, 2024 00:54
Enable Japanese locale on Steam Deck
#!/bin/bash
# This script is enabling (uncommenting) the Japanese locale and regenerates them
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -S glibc
sudo sed -i "s%#ja_JP.UTF-8 UTF-8%ja_JP.UTF-8 UTF-8%" /etc/locale.gen
sudo locale-gen
@n-ari
n-ari / ModulusAmittendus.md
Last active July 12, 2020 08:34
Modulus Amittendus writeup

Modulus Amittendus

You can see that n, e, cf are exported in pubkey.json.

These values are a bit strange:

  def initialize
    # ...
    @cf = modinv(@q, @p)   # (1)
@n-ari
n-ari / Rubikrypto.md
Created July 12, 2020 07:52
Rubikrypto writeup

Rubikrypto

This is only ElGamal cryptosystem on Rubik Cube.

The order of Rubik Cube Group is 43_252_003_274_489_856_000n and this is small enough to use Pohlig-Hellman.

So the algorithm is simple:

  1. get g, h, c1, c2.
  2. calculate y = log_g(c1) using Pohlig-Hellman.
@n-ari
n-ari / SweetLikeApplePie.md
Last active July 12, 2020 08:34
Sweet like Apple Pie writeup

Sweet Like Apple Pie

The output is output = sin(flag % pi()).

We can get flag % pi() = arcsin(output) using a binary search. Note that there are 2 possible answers.

So, we want to calculate k such that flag - k * pi() = arcsin(output).

Due to the Decimal, these values are calculated in 300-digits precision. That means,

@n-ari
n-ari / BeginnersCrypto.md
Last active July 12, 2020 08:34
Beginner's Crypto writeup

Beginner's Crypto

Given val such that flag * 2^{10000} mod 10^{175} == val.

From definition of modulus, we get flag * 2^{10000} - k * 10^{175} == val.

Divide by 2^{175}, flag * 2^{10000-175} - k * 5^{175} == val / 2^{175}

@dinvlad
dinvlad / cloudrun.jinja
Created September 6, 2019 15:51
Create Cloud Run Service through Deployment Manager
{% set PROJECT = env['project'] %}
{% set REGION = properties['region'] | default('us-east1') %}
{% set PARENT = 'projects/' + PROJECT + '/locations/' + REGION %}
{% set PREFIX = env['deployment'] %}
{% set CLOUDRUN_TYPE_PROVIDER = PREFIX + '-provider' %}
{% set CLOUDRUN_SERVICE_TYPE = PROJECT + '/' + CLOUDRUN_TYPE_PROVIDER + ':projects.locations.services' %}

シャニマス W.I.N.G. 優勝のためのポイント

1. サポートアイドルを育てよう!

  • ライブスキルを使うときには、ユニット全員のステータスが影響する。
  • レベルを上げるとステータスもスキルも強くなるぞ。
  • レベルを上げるのに必要な経験値はどんどん増える。1人を上げるよりも平均的に上げよう。

2. 特訓なしの sSSR よりは 特訓4回した sSR!

  • 特訓すると、より強力なスキルが解放されていく!特訓2回目の バフスキル、4回目のライブスキルをうまく覚えさせよう。
  • 「意地っ張りサンセット 西条樹里」「メロウビート・スローダウン 三峰結華」など、sSR でも破格に強いカードはある。
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@applch
applch / Black Dot Bug
Created May 9, 2018 12:35
cat Black-dot.txt
sms:&body=%20<⚫>%20👈🏻%20%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%
@voluntas
voluntas / death_march.md
Last active December 29, 2023 15:36
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。