Skip to content

Instantly share code, notes, and snippets.

@progzone122
progzone122 / clipboard.sh
Created May 19, 2024 13:11
Fixing the wps-office clipboard in Linux on Wayland
#!/bin/bash
while true; do
wl-paste | xclip -selection clipboard
xclip -selection clipboard -o | wl-copy
sleep 0.5
done
@j-thepac
j-thepac / Coding Principles.md
Last active May 19, 2024 13:43
Coding Principles

Principles

  • Loose Coupling
  • High Cohesion
  • Change is Local
  • It is Easy to Remove

Smells

  • Rigidity ( A -> B -> C . something hardcoded in C )
  • Fragility
  • Immobility

Kubernetes

Problem with VM:

  • Virtual machines comes with unwanted apps and services Eg: Browser
  • All process / Threads were not is user control .
  • Memory allocation was not in user control.
  • Syncing Virtual machines is not easy
  • Lot of configuration was needed
  • To delete and reconfigure was a nightmare.

Kubernetes

  • configure, automate, and manage applications using containers Image
@j-thepac
j-thepac / Synapse.md
Last active May 19, 2024 13:42
Azure Synapse

Synapse

Note :

  1. For JSON file make sure all new lines , blank spaces are removed.
  2. Dataflow , Notebooks etc - names has to start with String.
  3. Create Mapping Sheet: create ETL mappings and mapping data flows
  4. Create Lake Database: create a data model for your lake database

Deployment Strategy [GIT]

Summary

Kafka

https://github.com/j-thepac/KafkaScala/tree/master/src/main/scala/KafkaSpark

  • Kafka: Messaging system uses Distributed Commit logs
  • Producer :Source producing Data [as JSON]
  • Consumers :Subscribe to a topic (ie., poll particular partition)
  • Zookeeper: Kafka Brokers is working Correctly ,Synchronised etc.,
  • Broker: Computer Running Kafka (there can be 1 or more Broker)
  • Topic: Huge log file
    • default location = /kafka/kafka-logs-xxx
@dhh
dhh / linux-setup.sh
Last active May 19, 2024 13:38
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl btop \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@Fuwn
Fuwn / xp.md
Last active May 19, 2024 13:37
Windows XP All Editions Universal Product Keys Collection.

Although Microsoft does not support Windows XP updates any more, I’m sure there are still many users using it due to their personal habits or job demands. Therefore XP’s product keys may be necessary even now, and Fuwn provided you with the most comprehensive Windows XP product keys here, just in order to provide some convenience.

The following CD-KEYs are official and original from Microsoft, mainly used for Windows XP Professional Service Pack 2/3 VOL/VLK system images which are the easiest ones to find on the Internet. Their biggest advantage is your Windows XP will be activated after using these CD-KEYs to complete installation.

// Windows XP Pro Product Keys //

@ScienceWolf666
ScienceWolf666 / Operating Systems Administrator Cheat Sheet ( Ubuntu & Debian ).md
Last active May 19, 2024 13:35
Operating Systems Administrator Cheat Sheet ( Ubuntu & Debian )

📖 | Operating Systems Administrator Cheat Sheet

Systems Operation Manual " Ubuntu & Debian " Basic Commands Help Guide


Aktualizacja systemu

  • Aktualizacja listy pakietów: sudo apt update
  • Aktualizacja zainstalowanych pakietów: sudo apt upgrade
  • Aktualizacja systemu (uwzględnia usuwanie niepotrzebnych pakietów): sudo apt dist-upgrade

Instalacja i usuwanie pakietów

@mikechau
mikechau / 00_README.md
Last active May 19, 2024 13:34
Logging Rails 4 to Syslog, formatted w/ Logstash

Logging Rails 4 to Syslog, formatted w/ Logstash

Getting Started

Steps to get Rails 4 saving its output to Syslog via Rsyslog. This assumes you are on CentOS, but should be pretty adaptable to any other distribution. Ruby 2.0+ is also required.

  1. Add the gems lograge and logstash-event to your Gemfile. Feel free to remove from production if you'd like to test it in development as well or something.
  2. Update production.rb with the lograge settings and set the logger to Syslog::Logger.
  3. Add the conf files to /etc/rsyslog.d/. /etc/rsyslog.conf should have $IncludeConfig /etc/rsyslog.d/*.conf enabled, so it will load any additional configs from /etc/rsyslog.conf.