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 | |
set +e | |
f=$(mktemp) | |
red="\033[31;1m" | |
yellow="\033[33;1m" | |
reset="\033[;0m" | |
check_out_of_date(){ | |
link=$(curl https://archlinux.org/packages/?q=$1 | grep -v unstable | grep ">$1<" | grep "<td><a href=" | head -n1 | cut -f2 -d"\"") | |
if [[ $link == "" ]] ; then | |
return |
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
// valac --pkg gtk+-3.0 main.vala -o main | |
int main(string[] args){ | |
double constant_screen = 50.95481424; | |
Gtk.init(ref args); | |
var display = Gdk.Display.get_default(); | |
for (var i = 0; i < display.get_n_monitors (); i++){ | |
var monitor = display.get_monitor(i); | |
var width_milimeter = monitor.get_width_mm(); | |
var height_milimeter = monitor.get_height_mm(); | |
var width_pixel = monitor.get_geometry().width; |
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 | |
IFNAME="wlp3s0" | |
CON_NAME="Pardus-Wifi" | |
PASSWD="1234567891" | |
nmcli c add type wifi \ | |
ifname "${IFNAME}" \ | |
con-name ${CON_NAME} \ | |
autoconnect yes \ | |
ssid "${CON_NAME}" \ | |
802-11-wireless.mode ap \ |
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 | |
if ! which "$1" &> /dev/null ; then | |
exit 127 | |
fi | |
xhost +local: | |
mkdir -p "$HOME/.sandbox/home/$1" | |
exec env -i DISPLAY=$DISPLAY PULSE_SERVER=127.0.0.1 bwrap --bind / / \ | |
--dev /dev \ | |
--tmpfs /tmp --tmpfs /dev/shm \ | |
--bind /dev/dri /dev/dri \ |
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 python3 | |
from PyQt5.QtGui import QIcon, QFont | |
from PyQt5.QtCore import QDir, Qt, QUrl, QSize | |
from PyQt5.QtMultimedia import QMediaContent, QMediaPlayer | |
from PyQt5.QtMultimediaWidgets import QVideoWidget | |
from PyQt5.QtWidgets import (QApplication, QVBoxLayout, QWidget, QLabel) | |
# https://doc.qt.io/qtforpython-5/PySide2/QtMultimedia/QMediaPlayer.html | |
class VideoPlayer(QWidget): |
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
# docker build -t pardus:yirmibir . | |
FROM debian:bullseye | |
RUN apt update | |
RUN echo "deb http://depo.pardus.org.tr/pardus yirmibir main contrib non-free" > /etc/apt/sources.list | |
RUN apt update --allow-insecure-repositories | |
RUN apt install pardus-archive-keyring ca-certificates --allow-unauthenticated -y | |
RUN echo "deb http://depo.pardus.org.tr/pardus yirmibir main non-free contrib" > /etc/apt/sources.list | |
RUN echo "# deb-src http://depo.pardus.org.tr/pardus yirmibir main non-free contrib" >> /etc/apt/sources.list | |
RUN echo "" >> /etc/apt/sources.list | |
RUN echo "deb http://depo.pardus.org.tr/guvenlik yirmibir main non-free contrib" >> /etc/apt/sources.list |
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 | |
if [[ -e /sbin/init-normal ]] ; then | |
exit | |
fi | |
mv /sbin/init /sbin/init-normal | |
cat > /sbin/init <<EOF | |
#!/bin/bash | |
mount -t tmpfs tmpfs /tmp || true | |
mkdir -p /tmp/work/source /tmp/work/a /tmp/work/b /tmp/work/target || true | |
mount --bind / /tmp/work/source |
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 | |
if [[ $# -ne 2 ]] ; then | |
echo "Usage shc (source.sh) (output.c)" | |
exit 2 | |
fi | |
echo "#include <stdlib.h>" > "$2" | |
echo "int main(){" >> "$2" | |
echo " return system(\" \\" >> "$2" | |
cat $1 | sed 's/\\/\\\\/g;s/"/\\"/g;s/$/\\/g' >> "$2" | |
echo " \");" >> "$2" |
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/bash | |
dpkg-query -W -f='${Section}\t${Package}\n' | grep ^non-free | sed "s/.*\t//g" | xargs apt purge -y | |
pkg="" | |
set -e | |
export LANG=C | |
apt-cache policy $(apt list --installed | sed "s/\/.*//g") | while read line ; do | |
if echo "$line" | grep "^[a-zA-Z0-9-]*:$" >/dev/null ; then | |
pkg=$(echo $line | sed "s/://g") | |
elif echo $line | grep "non-free" >/dev/null ; then | |
echo $pkg |
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
/* TinyWM is written by Nick Welch <nick@incise.org> in 2005 & 2011. | |
* Modified by Ali Rıza KESKİN in 2019-? | |
* | |
* This software is in the public domain | |
* and is provided AS IS, with NO WARRANTY. */ | |
#include <X11/Xlib.h> | |
#include <stdlib.h> | |
#define MAX(a, b) ((a) > (b) ? (a) : (b)) |