Skip to content

Instantly share code, notes, and snippets.

View konradish's full-sized avatar

Konrad konradish

View GitHub Profile
@dbehnke
dbehnke / luksloopback.sh
Created December 30, 2014 20:25
luks encryption with loopback file
#!/bin/bash
loopdevice=/dev/loop0
loopfile=crypt.loop
#megabytes
loopsize=256
#/dev/mapper/xxxxx when open
cryptmapper=myCrypt
@ElijahLynn
ElijahLynn / pipe_to_docker_examples
Last active July 2, 2024 01:27
How to pipe to `docker exec` examples
# These examples assume you have a container currently running.
# 1 Pipe from a file
sudo docker exec --interactive CONTAINER_NAME /bin/bash < the_beginning.sh | tee the_beginning_output.txt`
#2a Pipe by piping
echo "echo This is how we pipe to docker exec" | sudo docker exec --interactive CONTAINER_NAME /bin/bash -
@jmkgreen
jmkgreen / keycloak-compose.yml
Created August 3, 2017 09:01
KeyCloak docker-compose file for swarm stack launch purposes
version: '3.3'
services:
keycloak:
image: jboss/keycloak-mysql
environment:
- constraint:serverclass==gateway
- PROXY_ADDRESS_FORWARDING=true
- MYSQL_USER=keycloak
@rponte
rponte / 1-CustomerCreatedEventSqsConsumer.java
Last active May 13, 2024 15:18
Spring Boot: Testing a @SqsListener with TestContainers and LocalStack
package br.com.zup.edu.app2.xxx.samples.aws.sqs;
import br.com.zup.edu.app2.xxx.samples.aws.sqs.model.Customer;
import br.com.zup.edu.app2.xxx.samples.aws.sqs.model.CustomerRepository;
import io.awspring.cloud.messaging.listener.SqsMessageDeletionPolicy;
import io.awspring.cloud.messaging.listener.annotation.SqsListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.messaging.handler.annotation.Header;
@VictorTaelin
VictorTaelin / gpt4_abbreviations.md
Last active June 18, 2024 15:03
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.