Skip to content

Instantly share code, notes, and snippets.

View rudimuliawan's full-sized avatar

Rudi Muliawan rudimuliawan

View GitHub Profile
import json
import ncs
import requests
from requests.auth import HTTPBasicAuth
class Itop:
url = "http://172.20.66.14:8000/webservices/rest.php"
@rudimuliawan
rudimuliawan / pipewire.md
Created September 24, 2024 12:10 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@rudimuliawan
rudimuliawan / 00_README.md
Created May 15, 2023 17:50 — forked from YumaInaura/00_README.md
Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

I was so confused to understand behaviior of Golang channels, buffer, blocking, deadlocking and groutines.

I read Go by Example topics.

def increment(numbers):
new_numbers = []
incr = 1
for n in numbers[::-1]:
result = n + incr
if result == 10:
new_numbers.insert(0, 0)
incr = 1
else:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 12 19:10:27 2019
@author: nodeflux
"""
import numpy
import pandas

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@rudimuliawan
rudimuliawan / rPi3-ap-setup.sh
Created April 24, 2017 13:36 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2016 rpi jessie image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
import csv
import unicodecsv
from django.core.exceptions import ValidationError
from stamps.core.utils import normalize_phone
from stamps.core.validators import validate_mobile_phone
dirty_csv = '/home/rudi/Documents/seorae_dirty.csv'
clean_csv = open('/home/rudi/Documents/seorae_clean.csv', 'w')