Skip to content

Instantly share code, notes, and snippets.

@zoilomora
zoilomora / README.md
Last active November 4, 2025 07:49
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@tuksik
tuksik / fix_git_ps1.sh
Last active November 4, 2025 07:49
Fix -bash: __git_ps1: command not found
#http://stackoverflow.com/questions/12870928/mac-bash-git-ps1-command-not-found
curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
echo 'source ~/.git-prompt.sh' >> ~/.bashrc
@rxaviers
rxaviers / gist:7360908
Last active November 4, 2025 07:47
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:
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@guitarrapc
guitarrapc / Bicep 設計.md
Last active November 4, 2025 07:41
Azure Bicep を IaC として使うことを考える

tl;dr;

  • Bicep を用いて、コードとリソースの一致を保証することは ARM Template の現在の性質ではできない。Microsoft は Deployment Stacks と呼ばれる仕組みで改善を検討している。
  • Bicep は、Complete modeを使うとコードとリソースが一致することがある程度保障できる。IaCとして使うなら Complete 一択。(それでもずれる)
  • Completeでは、最後に適用したBiepデプロイでリソースが決定されるので、Bicep スコープは狭く維持する。このため、ResourceGroup を target scopeにするのがいいだろう。Bicepを分ける = ResourceGroupをライフサイクルで分けることになる。

Bicep と ARM Template

bicep は、ARM Template の DSLでARM Templateに変換される。あくまでDSLなので、デプロイを含めた仕様、制約はARM Template に準じる

@mattppal
mattppal / viewport-size.sh
Last active November 4, 2025 07:38
Get Chrome viewport size and header height
osascript \
-e 'tell application "Google Chrome"' \
-e 'set b to bounds of front window' \
-e 'set h to (item 4 of b) - (item 2 of b)' \
-e 'set v to execute active tab of front window javascript "JSON.stringify([window.innerWidth, window.innerHeight])"' \
-e 'set AppleScript'"'"'s text item delimiters to ","' \
-e 'set vList to text items of (text 2 thru -2 of v)' \
-e 'set vW to item 1 of vList as number' \
-e 'set vH to item 2 of vList as number' \
-e 'set chromeH to h - vH' \
@steipete
steipete / mcp_call.py
Last active November 4, 2025 08:55
Use MCPs via CLI commands. Enable agents to add/remove/load MCPs on demand, progressive disclosure. No more context cluttering.
#!/usr/bin/env python3
"""MCP helper CLI using definitions from config/mcp_servers.json.
This script powers the `pnpm mcp:*` helpers. Typical invocations:
pnpm mcp:list
pnpm mcp:list chrome-devtools --schema
pnpm mcp:call playwright.browser_tabs action=list
pnpm mcp:call chrome-devtools.evaluate_script --args '{"function":"() => document.title"}'
pnpm mcp:call context7.get_library_docs topic=hooks tokens=1500
@timvisee
timvisee / my-subreddits.txt
Last active November 4, 2025 07:34
My subreddits
11foot8
18650masterrace
1911
2b2t
3Dprinting
3dshacks
3kliksphilip
45thworldproblems
5September2020
9CB9D65