Skip to content

Instantly share code, notes, and snippets.

View alileza's full-sized avatar
🛋️
I may be slow to respond.

Ali Reza alileza

🛋️
I may be slow to respond.
View GitHub Profile
@alileza
alileza / add_env.py
Last active August 29, 2023 16:55
Add env on grafana dashboard for all prometheus query
import argparse
# Create an argument parser
parser = argparse.ArgumentParser(description="Modify JSON file by adding environment variable")
# Add arguments
parser.add_argument("input_file", help="Path to the input JSON file")
parser.add_argument("output_file", help="Path to the output JSON file")
# Parse the command-line arguments
@alileza
alileza / uninstall
Created August 19, 2023 21:27
Uninstall soundflower from mac
#/bin/sh
sudo rm -rf /System/Library/Extensions/Soundflower.kext
sudo rm -rf /Library/Extensions/Soundflower.kext
sudo rm -rf /Library/Receipts/Soundflower*
sudo rm -rf /var/db/receipts/com.cycling74.soundflower.*
sudo rm -rf /Applications/Soundflower
@alileza
alileza / 001_posts.md
Created July 11, 2023 10:07
#001 Unleashing the Power of User Space in Linux Kernel: Revolutionizing Software Engineering 💡🚀

Unleashing the Power of User Space in Linux Kernel: Revolutionizing Software Engineering 💡🚀

The bridge between seamless computing and user-friendly experiences

Introduction:

In the vast realm of the Linux kernel, user space components hold the key to a seamless, efficient, and captivating computing experience. However, realizing the true potential of user space requires continual advancements in software engineering. From enhancing performance and security to delivering captivating user experiences, engineers are constantly innovating to optimize user space within the Linux kernel. In this blog post, we delve into the challenges faced in user space and explore the exciting solutions that are reshaping the landscape of software engineering.

The Challenge: Bridging the Gap between Kernel and Applications 🌉

@alileza
alileza / view_rbac.sh
Last active May 3, 2023 20:44
`sh view_rbac.sh system:serviceaccount:default:user-a`
#!/bin/bash
USER=$1
NAMESPACE=$2
check_permissions() {
resource=$1
namespace=$2
can_create=$(kubectl auth can-i create $resource --as=$USER --namespace=$namespace)
492.65 219.25 l
S
Q
q
0 J
0 j
0.5 w
0.50196 0.50196 0.50196 RG
827 219.25 m
598.79 219.25 l
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"strings"
)
@alileza
alileza / circle.yml
Created December 5, 2016 09:48
to use go 1.7.4
machine:
environment:
GODIST: "go1.7.4.linux-amd64.tar.gz"
post:
- mkdir -p download
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
dependencies:
<?php
ob_implicit_flush(1);
for(;;){
echo '💩';
echo str_repeat(' ', 1024*64);
sleep(1);
}
@alileza
alileza / crawler.go
Created July 27, 2016 04:29
crawl repository for internal godoc
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@alileza
alileza / app.js
Created July 26, 2016 09:25
prom-client example
var express = require('express');
var client = require('prom-client');
var server = express();
var counter = new client.Counter('push_notification', 'yaelah gitu aja ga paham', ['type']);
server.get('/send', function(req, res){
counter.inc({ type : 'android' })
res.send('sent')
})