Skip to content

Instantly share code, notes, and snippets.

View 844196's full-sized avatar

Masaya Takeda 844196

  • ใปใ‚“ใซใ‚ƒใ‚‰็”ฃๆฅญ
  • Sapporo, Japan
  • 10:02 (UTC +09:00)
  • X @efumaxay
View GitHub Profile
@romkatv
romkatv / instant-zsh.zsh
Last active January 31, 2025 22:44
Make zsh start INSTANTLY with this one weird trick
# Make zsh start INSTANTLY with this one weird trick.
#
# https://asciinema.org/a/274255
#
# HOW TO USE
#
# 1. Download this script.
#
# curl -fsSL -o ~/instant-zsh.zsh https://gist.github.com/romkatv/8b318a610dc302bdbe1487bb1847ad99/raw
#
@paulredmond
paulredmond / docker.conf
Last active May 6, 2024 15:38
Example www pool for PHP-FPM with dynamic Environment variables
; if you're using the starter bundle file `docker/php/php-fpm.d/docker.conf`
[global]
daemonize = no
pid = run/php-fpm.pid
[www]
listen = /usr/local/var/run/php-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
@shqld
shqld / Terser & Babel ใฎๅฅฝใใชใจใ“ใ‚.md
Last active December 20, 2023 15:27
ๅ€‹ไบบ็š„ใซTerser & Babelใฎๅฅฝใใชใจใ“ใ‚

ใ ใ‚Œ๏ผŸ

(credit: @tomo_e ใ•ใ‚“)

  • ๆ–ฐๅ’ 2 ๅนด็›ฎ
  • ใ‚ฆใ‚งใƒ–ใƒใƒผใƒ 
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 8, 2025 14:18
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@sasairc
sasairc / 0_asuka_ninomiya.md
Last active March 10, 2019 11:07
ไบŒๅฎฎ้ฃ›้ณฅใฏใƒปใƒปใƒป๏ผŸ

ไบŒๅฎฎ้ฃ›้ณฅใฏใƒปใƒปใƒป๏ผŸ

้ข็™ฝใใ†ใ ใฃใŸใฎใงใ€ใ‚ฌใ‚ทใƒฃใ‚’ๅ†็พใ™ใ‚‹็ฐกๆ˜“็š„ใชใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’ไฝœๆˆใ—ใพใ—ใŸใ€‚

gasha.h

/*
 * gasha.h - ไบŒๅฎฎ้ฃ›้ณฅ๏ผŸ
@muhozi
muhozi / Laravel-permission.md
Last active October 21, 2024 23:54
Setting proper permissions to laravel directory

Setting up proper permissions to a laravel directory

There are basically two ways to setup your ownership and permissions. Either you give yourself ownership or you make the webserver the owner of all files.

Webserver as owner (the way most people do it):

Assuming www-data is your webserver user.

@chairco
chairco / nodejs-ubuntu-bind-port-80.md
Created March 21, 2018 02:52 — forked from drawveloper/nodejs-ubuntu-bind-port-80.md
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command:

@dmail
dmail / url.js
Last active January 5, 2024 11:09
URL parts naming. Inspired from web browsers API (new URL(), window.location) and rfc3986.
/*
href
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
origin โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ authority โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ host resource
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ”‚ hostname โ”‚ pathname โ”‚ โ”‚
@imliam
imliam / take.php
Last active January 15, 2020 14:30
Run functions consecutively by piping through the result of one into the next.
<?php
if (! function_exists('take')) {
/**
* Run functions consecutively by piping through the result of one
* into the next.
*
* @param mixed $value A value
*
* @return object
*/
@sasairc
sasairc / slackoutgoing.md
Last active November 1, 2016 18:43
Slack Outgoing Webhooksใ‚’ๆ‰ฑใ†ใ‚ตใƒผใƒใฎใ‚ˆใ†ใชใ‚‚ใฎ

Slack Outgoing Webhooksใ‚’ๆ‰ฑใ†ใ‚ตใƒผใƒใฎใ‚ˆใ†ใชใ‚‚ใฎ

ใ“ใฎ่จ˜ไบ‹ใฏใŠใ•ใ‚€ใ‚“ๅฎถ Advent Calendar 2014ใฎ่จ˜ไบ‹ใงใ™ใŒใ€่ชญใ‚“ใงใ‚‚่ชญใพใชใใฆใ‚‚ๆง‹ใ„ใพใ›ใ‚“ใ€‚

ใ‚ฟใ‚คใƒˆใƒซ้€šใ‚Šใงใ™ใŒใ€Slack Outgoing Webhooksใ‚’ๆ‰ฑใ†ใ€Œๅ‡ฆ็†่จ€่ชž้žไพๅญ˜ใ€ใชใ‚ตใƒผใƒใฎใ‚ˆใ†ใชใ‚‚ใฎใ‚’ไฝœใ‚Šใพใ—ใŸใ€‚ ๅ‰ใซslackไธŠใงใฏใกใ‚ˆใ‚“ใ•ใ‚“ใซใ€ŒไฝœใฃใŸใ‚‰็Ÿฅ่ฆ‹ใŠ้ก˜ใ„ใ€ใจ้ ผใพใ‚ŒใŸใฎใงใ€ใใฎๆ—จใ‚’ๆ›ธใใพใ™ใ€‚

sasairc/marunage - Slack Outgoing Webhooksใฎใ‚ตใƒผใƒใฎใ‚ˆใ†ใชใ‚‚ใฎใ€‚