Skip to content

Instantly share code, notes, and snippets.

View ibarapascal's full-sized avatar
🏠
Working from home

Jing Jiawei ibarapascal

🏠
Working from home
View GitHub Profile
@tuzz
tuzz / github.css
Last active June 5, 2024 02:29
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@rxaviers
rxaviers / gist:7360908
Last active July 3, 2024 17:13
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@anon5r
anon5r / notes_for_regex.md
Last active July 20, 2021 02:09
正規表現メモ

正規表現メモ

項目 表記
改行を検索 \n
タブ文字を検索 \t
半角カナを検索 [ア-ンァ-ョッー゚゙・]
全角ひらがなを検索 [あ-んが-ぼぁ-ょゎっー]
全角カタカナを検索 [ア-ンガ-ボァ-ョヮッー]
半角英字を検索 [a-zA-Z]
@spacecowb0y
spacecowb0y / gource_to_git.sh
Last active September 9, 2021 11:33
From Gource to GIF (Gource and ffmpg are required)
#!/bin/bash
gource --key --seconds-per-day 0.1 --auto-skip-seconds 1 -400x300 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 input.mp4
mkdir frames
ffmpeg -i input.mp4 -vf scale=400:-1:flags=lanczos,fps=10 frames/ffout%03d.png
convert -loop 0 frames/ffout*.png output.gif
rm -rf frames

Introducing Runnable JavaScript, CSS, and HTML Code Snippets

On Stack Overflow and our other code-related sites, creating a minimal, complete, and verifiable example is the best way to get an answer to your question. We’ve always loved JSFiddle and sites like it because they let both askers and answerers reference runnable, working code that demonstrates their problem or solution.

Unfortunately, the use of these external sites introduces a few problems:

  1. If the link breaks, the post becomes worthless.
  2. If the code isn’t embedded in the page, visitors are forced to go elsewhere to get the full content of the question or answer.
  3. Also, because the code isn’t a part of our post Markdown, changes to it don’t show up in the revision history.

The community voiced similar concerns around external sites, which eventually led us to block posts that contain links to JSFiddle and similar sites without a corresponding code block. This is an unnecessary burden for both askers and answerers.

@broofa
broofa / pre-commit
Last active February 23, 2024 08:55
Git pre-commit hook that runs `eslint` with the `--fix` option to fix up issues where possible, and adds "fix"ed files into the commit
#!/bin/bash
cd "$(git rev-parse --show-toplevel)"
ESLINT="node_modules/.bin/eslint"
pwd
if [[ ! -x "$ESLINT" ]]; then
printf "\t\033[41mPlease install ESlint\033[0m (npm install eslint)\n"
exit 1
fi
@manabuyasuda
manabuyasuda / Noto-Sans-Jp.md
Last active May 26, 2024 06:26
Noto Sans JPを使うための手順。

Noto Sans JP

Noto Sans JPをWebサイトで使う場合、大きく分けて2つの方法があります。

  1. CDNを使う場合
  2. サーバーにフォントファイルを置く場合

CDNの場合は、他のサイトを含めて一度でも読み込まれていればブラウザ側でキャッシュを持っているので、読み込み速度が速くなることが期待できます。
サーバーのフォントファイルはサブセット化(不要なデータを削除すること)でファイルサイズを削減できるメリットがあります。

基本的にはCDNを利用して、フォールバックとしてサーバーに置いたフォントファイルとシステムフォントを指定するのがいいでしょう。

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@tterb
tterb / README-badges.md
Last active July 3, 2024 13:47
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active July 3, 2024 08:48
Front-end frameworks popularity (React, Vue, Angular and Svelte)