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 / 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;
# 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