Skip to content

Instantly share code, notes, and snippets.

View toshimaru's full-sized avatar

Toshimaru toshimaru

View GitHub Profile

Ruby: The future of frozen string literals

What is a literal?

In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.

Some examples:

7 # integer literal
@syuu1228
syuu1228 / 0001docomo-nmcli.txt
Last active April 16, 2025 17:54
Linuxのコマンドラインから0001docomoに接続
$ nmcli connection add type wifi ifname wlo1 con-name 0001docomo ssid 0001docomo
Connection '0001docomo' (a6fde1b0-6055-4e6c-a314-05027eb6083a) successfully added.
$ nmcli con edit id 0001docomo
===| nmcli interactive connection editor |===
Editing existing '802-11-wireless' connection: '0001docomo'
Type 'help' or '?' for available commands.
Type 'print' to show all the connection properties.
@willnet
willnet / sample_from_atendees.js
Last active November 28, 2024 06:11
google meet参加者から誰か一人をランダムで選択するスクリプト
// chromeを利用して、ユーザ一覧を表示しつつconsoleで↓を実行すると、現在の参加者からランダムで一人表示することができます
const names_array = document.querySelector("[aria-label='参加者']").innerText.split("\n").filter((word)=> !word.match(/\(|メイン|ミュート|主催者|画面共有|その他の操作|keep_off|more_vert|keep|domain_disabled/))
const names_set = new Set(names_array)
const names_uniq_array = Array.from(names_set)
names_uniq_array[Math.floor(Math.random() * names_uniq_array.length)]
@martinwoodward
martinwoodward / mermaid.md
Created February 11, 2022 20:34
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe->>dotcom: iframe ready

github.ref vs github.head_ref in GitHub Actions

Trigger event pull_request pull_request_target push
github.ref refs/pull/53/merge refs/heads/main refs/heads/test/pull_request_target
github.head_ref test/pull_request_target test/pull_request_target -
  • main: default branch
  • test/pull_request_target: topic branch name
  • 53: pull request number
@n0mimono
n0mimono / note.md
Last active June 15, 2022 20:38
相談的なやつのメモ

概要

「CTO採用したいんやがどんな人採用すればいいかわからん」と聞かれることあるので、自分のスタートアップのCTO感をここにふらっとまとめてみる。

CTO

そもそもCTOは

  • 経営チームのメンバーである
  • すなわち経営職である
@Neilblaze
Neilblaze / SD.md
Last active April 1, 2025 21:38
Standard System Design Interview Approach Template
@willnet
willnet / rails_6_1_new_features.md
Last active December 2, 2024 09:46
「Rails 6.1で新しく入る機能について」iCARE Dev Meetup #12 の登壇内容 https://icare.connpass.com/event/183716/

Rails 6.1で新しく入る機能について

@willnet

最近のRailsリリース日

  • 6.0.0 (2019/08/06)
  • 5.2.0 (2018/04/09)
  • 5.1.0 (2017/04/27)
  • 5.0.0 (2016/06/30)
@Tehnix
Tehnix / CI.yml
Created March 30, 2020 21:21 — forked from FedericoPonzi/CI.yml
Ready to use Github workflow for cross-compiling a rust binary to many Linux architectures.
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- 'v*.*.*'
@mala
mala / CVE-2019-5418_is_RCE.md
Last active February 7, 2021 04:25
Rails の CVE-2019-5418 は RCE (Remote code execution) です