Skip to content

Instantly share code, notes, and snippets.

View Ara4Sh's full-sized avatar

Arash Shams Ara4Sh

View GitHub Profile
@Ara4Sh
Ara4Sh / code-node.js
Created July 11, 2023 10:33 — forked from m-esm/code-node.js
embassy-appointment-n8n
const vision = require("@google-cloud/vision");
const puppeteer = require("puppeteer");
const fs = require("fs-extra");
const URL = "https://YOUR_EMBASSY_URL_AND_THE_PAGE";
const browser = await puppeteer.connect({
browserWSEndpoint: `ws://browserless:3000?token=TOKEN_HERE`,
args: [`--window-size=1024,860`],
defaultViewport: {
@Ara4Sh
Ara4Sh / jenkinsfile-commons.groovy
Created April 3, 2022 10:56 — forked from aliok/jenkinsfile-commons.groovy
Sample advanced Jenkins pipeline
/**
* This file provides common stuff to be used in the pipelines.
* It is important to load it after repo checkout is done: see https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#triggering-manual-loading
*
*/
/**
* Dumps some info about the environment.
* @return
*/
@Ara4Sh
Ara4Sh / docker-for-mac.md
Created August 3, 2021 07:48 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@Ara4Sh
Ara4Sh / README.md
Created December 4, 2020 18:32 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@Ara4Sh
Ara4Sh / 01_basic.go
Created June 14, 2020 07:17 — forked from reagent/00_README.md
Custom HTTP Routing in Go
package main
import (
"io"
"log"
"net/http"
)
func main() {

Monolith

The Monolithic Ball of Mud

  • The Ball Of Mud represents the worst case scenario for a Monolith. Also called as Spaghetti Code.
  • No clear isolation in the application.
  • Complex dependencies where everything depends on every other thing.
  • Hard to understand and harder to modify.

Cleaning Up The Ball Of Mud

  • To clean up the ball of mud we introduce isolation into the application by dividing the application along clear domain boundaries.
  • We introduce packages and libraries that help isolate related pieces of code. They provide a clean and consistent interface.
@Ara4Sh
Ara4Sh / workflow.md
Created March 23, 2020 22:26
Versioning and Git Workflow

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

@Ara4Sh
Ara4Sh / resize.md
Created February 21, 2020 17:30 — forked from b1naryth1ef/resize.md

Pillow

(64, 64)
        0.217446804047 total time
        217446.804047 ns / op
(128, 128)
        0.085732460022 total time
 85732.460022 ns / op
@Ara4Sh
Ara4Sh / disable-hyperthreading.sh
Created January 30, 2020 11:32 — forked from johanburati/disable-hyperthreading.sh
Disable hyperthreading
#!/bin/bash
for cpu in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list)
do
echo 0 > /sys/devices/system/cpu/cpu${cpu}/online
done
@Ara4Sh
Ara4Sh / nginx.conf
Created August 28, 2019 18:01 — forked from justincormack/nginx.conf
Using Lua and Nginx to proxy Amazon web services example
# example location parts of nginx.conf
# add your own AWS keys, server lines etc, and set your aws domains, paths
http {
# you will need the luacrypto in the cpath, download from http://luacrypto.luaforge.net/
lua_package_cpath "/home/justin/lua/luacrypto-0.2.0/src/l?.so.0.2.0;;";
server {
listen 80;