Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
cellularmitosis / README.md
Last active May 8, 2024 16:36
QEMU PowerPC G4 OS X Tiger (10.4) setup
@raftheunis87
raftheunis87 / eslint-vscode-airbnb.md
Last active May 8, 2024 16:33
Setting up ESLint on VS Code with Airbnb JavaScript Style Guide
  1. cd coding-directory
  2. npm init -y
  3. npm install --save-dev --save-exact eslint eslint-config-airbnb-base eslint-plugin-import
  4. Create .eslintrc file with following content:
{
  "extends": "airbnb-base",
  "env": {
    "browser": true,
 "node": true
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 16:30
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

@Manaconda
Manaconda / gist:d8e1cc7cdc59d39bebccb5136113438d
Created March 10, 2020 11:14
Export AutoPilot Configuration JSON
Install-Module -name WindowsAutoPilotIntune
Connect-MSGraph
$apppolicies = Get-AutoPilotProfile
$apppolicies | ConvertTo-AutoPilotConfigurationJSON | Out-File "C:\AutopilotConfigurationFile.json" -Encoding ascii
# save exported json to C:\windows\Provisioning\Autopilot
@UVJkiNTQ
UVJkiNTQ / run.sh
Created June 24, 2022 13:34
示例脚本
#!/bin/sh
while read LINE; do
# 请在do与done之间写下需要执行的语句,为了避免错误,文件对象请使用绝对路径。
# 以下是一些例子,主要为一些主流的备份工具
rclone copy ${LINE} [remote:remote_dir]
# rclone支持多种网盘及对象存储,详见:https://github.com/rclone/rclone
bypy upload ${LINE} [remote_dir]
# bypy支持百度网盘的上传下载,详见:https://github.com/houtianze/bypy
fake115uploader -m ${LINE} [remote_dir]
@williamd1k0
williamd1k0 / EditorIconTexture.gd
Created May 6, 2024 23:46
Helper Texture class to use Godot Editor icons in plugins, such as main screen plugins.
@tool
class_name EditorIconTexture
extends AtlasTexture
var icon :String:
set(val):
icon = val
_update_icon.call_deferred()
func _init():
@haproxytechblog
haproxytechblog / blog20181109-01.cfg
Last active May 8, 2024 16:24
Application-Layer DDoS Attack Protection with HAProxy
backend per_ip_rates
stick-table type ip size 1m expire 10m store http_req_rate(10s)
@devfraga
devfraga / modelo.md
Created May 6, 2024 21:58
Modelo contato freela

Modelo e-mail

Modelo 1


Assunto: Alcance mais clientes para sua empresa de forma eficaz.

Olá [Nome do Proprietário] ou [Empresa],