Skip to content

Instantly share code, notes, and snippets.

@nygmaaa
nygmaaa / festivals.ics
Last active May 7, 2024 09:16
iOS/macOS 日历中缺少的节假日订阅
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Nygma//Festivals//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Asia/Shanghai
LAST-MODIFIED:20231018T085200Z
TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Shanghai
X-LIC-LOCATION:Asia/Shanghai
@scottwd9
scottwd9 / building-evolutionary-architectures.md
Created August 13, 2018 12:28
Building Evolutionary Architectures

Building Evolutionary Architectures

Chapter 1 - Software Architecture

Architecture is 'the important stuff, whatever that is' or 'the parts that are hard to change later'. An architect analyzes business, domain, and other requirements to develop solutions that satisfy a list of prioritized architectural characteristics (-ilities). We should consider time and change with respect to architecture, or evolvability.

Software ecosystems are in a state of dynamic equilibrium. New languages, tools, methods constant force new equilibriums to emerge (free OS, linux, + free operations, puppet, led to the shift to containers). The pace of change in technology is constantly and rapidly changing in unexpected ways. We should architect systems knowing the landscape will change. Make ease of change a principal of architecture, remove the 'hard to change' definition of architecture.

An evolutionary architecture supports guided, incremental change across multiple dimensions. Evolvability is a meta characteristic that

@4abhinavjain
4abhinavjain / reinstall_VPS_from_inside.txt
Last active May 7, 2024 09:13 — forked from ClashTheBunny/reinstall_VPS_from_inside.sh
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...
@selvalogesh
selvalogesh / keepSysAwake.ps1
Last active May 7, 2024 09:12
A system tray app for windows using Power shell script to keep your system awake.
#Thanks to - https://github.com/damienvanrobaeys/Build-PS1-Systray-Tool
# - https://www.systanddeploy.com/2018/12/create-your-own-powershell.html
# - https://stackoverflow.com/questions/54649456/powershell-notifyicon-context-menu
# - https://adamtheautomator.com/powershell-async/
[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | out-null
[System.Reflection.Assembly]::LoadWithPartialName('presentationframework') | out-null
@joepie91
joepie91 / .md
Last active May 7, 2024 09:12
Running a Node.js application using nvm as a systemd service

Read this first!

Hi there! Since this post was originally written, nvm has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!


The original article

Trickier than it seems.

@timcsy
timcsy / imgur.py
Last active May 7, 2024 09:09
備份 HackMD 上面之前上傳到 imgur 的圖片。請到 HackMD 的設定頁面把所有的筆記下載下來,放在 Notes 資料夾裡面,然後把這個 imgur.py 檔放在外面,執行 python imgur.py 之後就可以備份囉!備份後的圖將存到 imgur 資料夾
import os
from glob import glob
import re
import urllib.request
paths = glob('Notes/*.md')
results = []
for path in paths:
with open(path, 'r', encoding='UTF-8') as fin:
data = fin.read()
@wojteklu
wojteklu / clean_code.md
Last active May 7, 2024 09:09
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@roachhd
roachhd / README.md
Last active May 7, 2024 09:08
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@wrmack
wrmack / Win11.md
Last active May 7, 2024 09:08
Windows 11 on MacBook M1

Windows 11 on MacBook M1 (ARM)

Steps I went through to install a Windows Insider Preview VHDX on a Macbook Pro using UTM. I needed Windows because I was developing an app to submit to the Microsoft Store. With the following setup I was able to develop an electron-based app and submit it to the Microsoft Store.

  1. Download the VHDX from Windows Insider Previews. You need to register for the Insider Program and sign in.
    • under Select edition select the Canary channel and press Confirm
    • select language and confirm
    • press Download
  2. Open UTM and press + to create a new virtual machine
    • Virtualize
  • Windows
@loilo
loilo / pass-slots.md
Last active May 7, 2024 09:07
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {