Skip to content

Instantly share code, notes, and snippets.

@yufengwng
yufengwng / arch_cheatsheet.txt
Last active May 8, 2024 11:43
Arch Linux Commands Cheatsheet
pacman
======
view logs: /var/log/pacman.log
update system
# pacman -Syu
list installed packages
# pacman -Q
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 11:42
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

@tsaarni
tsaarni / README.md
Last active May 8, 2024 11:42
How to connect to Azure AKS Kubernetes node VM by SSH

How to connect to Azure AKS Kubernetes worker node by SSH

Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, then you can use that VM as jump host and connect the worker via private IP.

Alternatively public IP can be assigned to a worker node. This readme shows how to do that.

Steps how to attach public IP to a worker node

find out the resource group that AKS created for the node VMs

@Adem68
Adem68 / flutter-project-line.md
Last active May 8, 2024 11:41
How many lines does your Flutter project have?
  • Open terminal and go to your project's lib folder. After that run the command below.
  • find . -name '*.dart' ! -name '*.g.dart' ! -name '*.freezed.dart' ! -name '*.gr.dart' ! -name '*.gen.dart' | xargs wc -l

Thanks @AcetylsalicylicAcid for excluding generated files.

@iThalir
iThalir / DAY-02- ASSIGNMENT
Created May 8, 2024 11:39
ARAVINDH- CKA ANSWERS
CERTIFICATION ASKED QUESTIONS
1. Create a new deployment called web-proj-268 with image nginx:1.16 and one replica.
Next, upgrade the deployment to version 1.17 using rolling update.
Make sure that the version upgrade is recorded in the resource annotation.
$kubectl create deploy web-proj-268 --image=nginx:1.16 --replicas=1
$kubectl get deploy -o wide
$kubectl set image deploy/web-proj-268 nginx=nginx:1.17
@jinsley8
jinsley8 / google-tag-manager.php
Created February 13, 2022 17:53
Enqueue Google Tag Manager script without tracking Admin
/**
* Enqueue Google Tag Manager script
*
*/
/* Add Google Tag Manager javascript code as close to
the opening <head> tag as possible
=====================================================*/
define("GTM_TAG","GTM-XXXXXX", false); // Replace with GTM tracking ID
@porjo
porjo / dump_route53_records.md
Last active May 8, 2024 11:38
Export route53 records to CSV

Retrieve hosted zones with aws route53 list-hosted-zones then enter the zone Id below:

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
   jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @tsv'
@cg00001
cg00001 / init.lua
Last active May 8, 2024 11:37
Textadept sample configuration
-- Adjust the default theme's font and size.
if not CURSES then
view:set_theme('base16-irblack', {font = 'Inconsolata Condensed Medium', size = 14})
end
-- UI Size, this works in 1366x768.
ui.size = {600,742}
-- Enable word-wrapping.
view.wrap_mode = 1
@kenji21
kenji21 / xcode-previous-older-sdks.md
Last active May 8, 2024 11:37
Use previous/older SDKs with Xcode
@EmadAdly
EmadAdly / install-android-sdk-in-ubuntu.md
Last active May 8, 2024 11:37
install JDK and Android SDK on Linux Ubuntu

install openjdk

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk