This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xmlrpc.server import SimpleXMLRPCServer | |
from shutil import disk_usage | |
from json import dumps | |
kilo_bytes = 1024 | |
mega_bytes = 1024 * 1024 | |
giga_bytes = 1024 * 1024 * 1024 | |
def send_to_client(): | |
(total, used, free) = disk_usage ("/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from json import loads | |
from xmlrpc.client import ServerProxy | |
from os import system | |
from sys import argv | |
def ping_server(server_addr): | |
print("Checking the server status...") | |
status = system("ping -c 1 -w 5 " + server_addr + " > /dev/null 2>&1") | |
if status == 0: | |
return ("Up", server_addr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dnf | |
if __name__ == '__main__': | |
with dnf.Base() as base: | |
base.fill_sack() | |
q = base.sack.query() | |
i = q.installed() | |
pkg32 = pkgnoarch = pkg64 = 0 | |
for pkg in i: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ver=`uname -r` | |
if [[ $(whoami) != "root" ]]; then | |
echo "Must be root" | |
exit 1 | |
fi | |
if [[ `rpm -q kernel-PAE-devel` ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
headerbar { | |
min-height: 0; | |
padding-left: 2px; | |
padding-right: 2px; | |
padding-top: 1px; | |
padding-bottom: 1px; | |
} | |
headerbar entry, | |
headerbar spinbutton, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python. | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.scrollbars-visible-always { | |
// blok kode berikut untuk pengaturan scrollbar pada editor // | |
/deep/::-webkit-scrollbar { | |
width: 0.6rem; | |
height: 0.6rem; | |
z-index: 99999; | |
display: none; // baris ini yang membuat scrollbar menjadi tersembunyi secara default | |
} | |
/deep/:hover::-webkit-scrollbar { | |
display: block; // baris ini yang membuat scrollbar terlihat saat cursor mengarah kepadanya |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch --excludepkgs=kernel*,perf,perf-debuginfo,python-perf,python-perf-debuginfo | |
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch --excludepkgs=kernel*,perf,perf-debuginfo,python-perf,python-perf-debuginfo | |
repo --install --name=alunux-kernel-lts --baseurl=https://copr-be.cloud.fedoraproject.org/results/alunux/kernel-lts/fedora-$releasever-$basearch/ | |
repo --install --name=alunux-budgie-git --baseurl=https://copr-be.cloud.fedoraproject.org/results/alunux/budgie-desktop-git/fedora-$releasever-$basearch/ | |
repo --name="RPMFusion Free" --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch | |
repo --name="RPMFusion Free - Updates" --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-$releasever&arch=$basearch | |
repo --name="RPMFusion Non-Free" --mirrorlist=http:// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <ifaddrs.h> | |
#include <sys/types.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> | |
#include <linux/wireless.h> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
headerbar { | |
min-height: 0; | |
padding-left: 2px; | |
padding-right: 2px; | |
padding-top: 1px; | |
padding-bottom: 1px; | |
} | |
headerbar entry, | |
headerbar spinbutton, |
OlderNewer