Skip to content

Instantly share code, notes, and snippets.

View pine's full-sized avatar
🍍
Chaos

Pine Mizune pine

🍍
Chaos
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active April 7, 2025 09:15
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@tonvanbart
tonvanbart / House.java
Last active July 12, 2024 01:21
How to capture constructor arguments while Mockito is mocking the constructed class. Not pleasant but it works.
class Dog {
String name;
public Dog(String name) {
this.name = name;
}
public String bark() {
return name + " says: Woof!";
@remarkablemark
remarkablemark / dispatch-keydown-event.js
Created November 16, 2022 23:31
JavaScript dispatch keydown event programmatically
const KEY_CODE = {
ARROW_DOWN: 40,
BACKSPACE: 8,
ENTER: 13,
};
/**
* Dispatch keydown event.
*
* @param {number} keyCode
@igorborgest
igorborgest / inner_join_vs_explode.sql
Created May 2, 2022 17:54
SparkSQL and Hive unnest examples.
-- REGULAR
WITH
ORDERS(order_id, dt) AS (
VALUES
(1, DATE('2022-01-01')),
(2, DATE('2022-01-02')),
(3, DATE('2022-01-03'))
),
ITEMS(item_id, order_id, price) AS (
VALUES
@serihiro
serihiro / Emoloyee.java
Last active January 1, 2022 12:48
Hot to smart-cast a Java class variable in Kotlin
import javax.annotation.Nullable;
public class Employee {
private String firstName;
private String lastName;
private Integer age;
public Employee(String firstName, String lastName, Integer age){
this.firstName = firstName;
this.lastName = lastName;
@mattak
mattak / job.md
Last active January 10, 2023 05:50

連絡先

  • [email protected] or twiter:@mustankatti
  • ↑だと気付きやすいのでありがたいです 🙏
  • お手伝いできることがあれば、お気軽にご相談ください 🙆‍♀️

共通

業務形態:

@progrium
progrium / README.md
Last active April 1, 2025 13:12
Setting up M1 Macs for x86 development with Homebrew

Key Points

  • In general, binaries built just for x86 architecture will automatically be run in x86 mode
  • You can force apps in Rosetta 2 / x86 mode by right-clicking app, click Get Info, check "Open using Rosetta"
  • You can force command-line apps by prefixing with arch -x86_64, for example arch -x86_64 go
  • Running a shell in this mode means you don't have to prefix commands: arch -x86_64 zsh then go or whatever
  • Don't just immediately install Homebrew as usual. It should most likely be installed in x86 mode.

Homebrew

Not all toolchains and libraries properly support M1 arm64 chips just yet. Although

@mala
mala / 202012_smooz.md
Last active October 6, 2022 14:28
Smoozサービス終了に寄せて

Smoozサービス終了に寄せて

前置き

  • この文章と、それに含まれる考察や各サービスへの脆弱性報告などはmala個人の活動であり、所属している企業とは関係ありません。
  • 一方で私は、企業が閲覧履歴を収集して何をしたいのか、所属してる企業や他社事例について、ある程度詳しい当事者でもあります。
  • 一般論として書けることは書けるが、(業務上知り得た知識で開示されてないものなど)個別具体的なことは書けないこともあり、また観測範囲に偏りがある可能性もあります。

Smoozに報告した脆弱性2件

@yamaneko1212
yamaneko1212 / memo.md
Last active December 30, 2024 01:55
M1 Macでx86_64のコンテナイメージをビルドして実行する.

M1 Macでx86_64のDockerコンテナイメージをビルドして実行する.

M1 MacBookAirでamd64(x86_64)のコンテナイメージをビルドして実行する方法を検討しました. 現状Experimentalな機能を使用しているので,プロダクションでの使用は注意してください.

検証環境

@msymt
msymt / method.md
Last active September 5, 2022 13:29
IntelliJ IDEAでバックスラッシュ(\)を打つ方法

IntelliJ IDEAでバックスラッシュ(\)を打つ方法

環境

IntelliJ IDEA 2020.1.1 (Community Edition)
Build #IC-201.7223.91, built on April 30, 2020
Runtime version: 11.0.6+8-b765.40 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
GC: ParNew, ConcurrentMarkSweep