Skip to content

Instantly share code, notes, and snippets.

@mediafinger
mediafinger / single_page_rails_app.ru
Created April 25, 2024 17:15
Single Page Rails App example / template
# filename: single_page_rails_app.ru
# RUN via: `rackup single_page_rails_app.ru`
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rack", "2.2.9"
gem "rails", "~> 7.1"
@ygotthilf
ygotthilf / jwtRS256.sh
Last active April 25, 2024 17:19
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@SzymonPobiega
SzymonPobiega / gist:5220595
Last active April 25, 2024 17:19
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active April 25, 2024 17:19
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@deepakpk009
deepakpk009 / media.json
Created November 8, 2017 14:02
sample free video urls
{
"categories": [
{
"name": "Movies",
"videos": [
{
"description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
],

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 25, 2024 17:16
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@vishal2376
vishal2376 / FlipAnimation.kt
Created April 25, 2024 17:16
Card Flip Animation using Jetpack Compose
package com.vishal2376.animations.ui.theme
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.EaseInOut
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@rponte
rponte / 1-CustomerCreatedEventSqsConsumer.java
Last active April 25, 2024 17:16
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;
@figassis
figassis / randomusphones.json
Created December 2, 2018 13:58
1000 valid us phone numbers for testing
["+1-418-543-8090","+1-587-530-2271","+1-404-724-1937","+1-443-307-1473","+1-329-420-1792","+1-770-212-6011","+1-473-522-7496","+1-477-962-3907","+1-478-797-3175","+1-948-914-6246","+1-268-763-5180","+1-369-441-8619","+1-501-926-2756","+1-223-919-0967","+1-328-857-2537","+1-636-613-5429","+1-547-538-9848","+1-523-317-7761","+1-557-680-6290","+1-905-546-5021","+1-975-999-8212","+1-358-342-3321","+1-669-937-7112","+1-506-676-9834","+1-510-518-1673","+1-282-995-0297","+1-667-407-8456","+1-396-518-2124","+1-528-705-6591","+1-395-288-8024","+1-390-949-5954","+1-437-295-3568","+1-227-799-6356","+1-703-363-8155","+1-618-720-3464","+1-557-394-8274","+1-237-257-1580","+1-623-416-0089","+1-533-762-6549","+1-299-471-0213","+1-790-548-2248","+1-469-253-5139","+1-580-303-6087","+1-507-639-8400","+1-269-771-0214","+1-645-818-7021","+1-436-974-4859","+1-952-660-7350","+1-493-885-4329","+1-697-392-0705","+1-744-865-4521","+1-887-526-1105","+1-816-630-9743","+1-496-717-7301","+1-212-475-2813","+1-222-993-6707","+1-868-574-867