Skip to content

Instantly share code, notes, and snippets.

@keesun
keesun / AppConfig.java
Created January 18, 2012 15:36
Spring 3.1's Configurer Pattern
@Configuration
@EnableHello
public class AppConfig implements NameConfigurer {
@Override
public void configure(Hello hello) {
hello.setName("Thank you very much, Toby.");
}
}
@gschmutz
gschmutz / docker-compose.yml
Last active May 13, 2024 15:58
Docker Compose with Kafka Single Broker, Connect, Schema-Registry, REST Proxy, Kafka Manager
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:3.3.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
@aveao
aveao / bird1-bird-vultr.conf
Last active May 13, 2024 15:58
BIRD 1 and 2 configs for BGP stuffs (HE Tunnelbroker, Vultr etc)
router id [our IPv4];
protocol bgp vultr
{
local as [our ASN];
source address [our IPv4 from vultr];
import all;
export filter {
if net ~ [[the IPv4 block we want to announce]] then accept;
reject;
@Glazzes
Glazzes / App.tsx
Last active May 13, 2024 15:58
React Native pinch to zoom advanced
/**
* After some thoughts on this topic, I've decided to turn this gist along with other features into a library so you can zoom
* whatever you want.
*
* @author Santiago Zapata, Glazzes at Github <3
* @description This gist makes part of an article I'm writing about this topic (in spanish). This solution takes into account
* the linear algebra concepts and geometrical interpretation of the transform-origin property specification, this solution
* takes heavy inspiration from William's Candillon +3 year old video in this topic, however this solution brings it to the
* modern day along with a huge fix that prevents the origin from being displaced by an incorrect offset calculation after
* the first zoom interaction.
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 13, 2024 15:56
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Starefossen
Starefossen / tmux-cheats.md
Last active May 13, 2024 15:56
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@miranda-zhang
miranda-zhang / linux.md
Last active May 13, 2024 15:55
Linux Command Cheat Sheet, Ubuntu, CentOS

Linux Command Cheatsheet

Linux Keyboard shortcuts

open terminal: Ctrl+Alt+T

Ctrl + C is used to kill a process with signal SIGINT , in other words it is a polite kill .

Ctrl + Z is used to suspend a process by sending it the signal SIGTSTP , which is like a sleep signal, that can be undone and the process can be resumed again.

@rchardptrsn
rchardptrsn / compose_sql_server.yaml
Last active May 13, 2024 15:55
Docker compose file for SQL Server 2022
services:
mssql:
container_name: mssql-db
hostname: mssql-db
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: 'Passw0rd'
MSSQL_DATA_DIR: /var/opt/mssql/data
@Jekins
Jekins / Markdown-docs.md
Last active May 13, 2024 15:54
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@wojteklu
wojteklu / clean_code.md
Last active May 13, 2024 15:54
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