Skip to content

Instantly share code, notes, and snippets.

View undrash's full-sized avatar
🎧
Vibing

Andrei Gaspar undrash

🎧
Vibing
View GitHub Profile
@undrash
undrash / comfy-dtype-bug-workflow.json
Created October 31, 2023 05:42
Comfy dtype Bug Workflow
{
"last_node_id": 164,
"last_link_id": 954,
"nodes": [
{
"id": 30,
"type": "CLIPTextEncode",
"pos": [
589,
265
@undrash
undrash / ffmpeg-stream.sh
Created June 22, 2023 09:15
Stream Test FFMPEG
#!/bin/bash
url=$(tr -d ' ' <<< "$1")
ffmpeg -re -f lavfi -i "sine=frequency=1:beep_factor=480" \
-f lavfi -i "testsrc=size=hd720:rate=25" \
-vf "drawtext=text='%{gmtime}':fontsize=48:rate=25:x=0:y=0:fontcolor=white:box=1:boxcolor=0x00000099" \
-c:v libx264 -b:v 5M \
-c:a aac \
-r 25 \
-ar 48k \
-ab 128k \
@undrash
undrash / Exercise.ipynb
Created September 17, 2022 13:54 — forked from kristss/Exercise.ipynb
Lab exercise
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@undrash
undrash / apigatewaydomain.ts
Created August 22, 2022 10:08 — forked from lukehoban/apigatewaydomain.ts
API Gateway Domain Mapping in Pulumi
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// The services we want to host on our domain...
const api1 = new aws.apigateway.x.API("api1", {
routes: [
{method: "GET", path: "/", eventHandler: async(ev) => {
return {
statusCode: 200,
body: JSON.stringify({hello: "world"}),
@undrash
undrash / simple-hash.js
Created June 13, 2022 14:26 — forked from jlevy/simple-hash.js
Fast and simple insecure string hash for JavaScript
// This is a simple, *insecure* hash that's short, fast, and has no dependencies.
// For algorithmic use, where security isn't needed, it's way simpler than sha1 (and all its deps)
// or similar, and with a short, clean (base 36 alphanumeric) result.
// Loosely based on the Java version; see
// https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript
const simpleHash = str => {
let hash = 0;
for (let i = 0; i < str.length; i++) {
const char = str.charCodeAt(i);
hash = (hash << 5) - hash + char;
@undrash
undrash / spaces.md
Created May 22, 2022 08:35
DO Spaces Make Bucket Public

Create policy.json file.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PublicReadGetObject",
      "Effect": "Allow",
 "Principal": "*",
@undrash
undrash / ue-command-fixes.md
Created April 18, 2022 15:56
UE-QuickFix-Commands-CheatSheet

Shadows on foliage

r.RayTracing.Geometry.InstancedStaticMeshes.Culling 0

Shadow artifacts

r.RayTracing.NormalBias 0
@undrash
undrash / grpc-client-examples.js
Created September 6, 2021 09:37
GRPC Client Examples
// UNARY CLIENT
const grpc = require('@grpc/grpc-js');
const client = new EchoService(
'localhost:3000',
grpc.credentials.createInsecure()
);
client.echoUnary({ value: 'hello unary' }, (err, response) => {
if (err) {
@undrash
undrash / js random id
Created May 27, 2021 13:48
random id
const randomId = () => {
return Math.random().toString(36).substr(2, 5);
};
# Install Jenkins on AWS EC2 instance
# https://pkg.jenkins.io/redhat/
# https://d1.awsstatic.com/Projects/P5505030/aws-project_Jenkins-build-server.pdf
# https://d1.awsstatic.com/Projects/P5505030/aws-project_Jenkins-build-server.pdf
# https://gist.github.com/diegopacheco/6d69e0cfaf13d4351cfa700bb4af8172
# https://www.youtube.com/watch?v=uu5XcU4EPzQ
sudo yum update