Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am yrmt on github.
  • I am yrmt (https://keybase.io/yrmt) on keybase.
  • I have a public key whose fingerprint is 81F7 EC68 C5BD 5DED 7A7B 2832 6A09 5CC6 2D99 C8F7

To claim this, I am signing this object:

@nbyouri
nbyouri / build-xquartz.md
Last active August 29, 2015 14:09
Build XQuartz.

dependencies

  • meta-pkgs/modular-xorg-libs
  • meta-pkgs/modular-xorg-apps
  • x11/presentproto
  • wm/libAppleWM

Mesa-8.0.5

# curl -O ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/8.0.5/MesaLib-8.0.5.tar.gz
# tar xf MesaLib-8.0.5.tar.gz; cd MesaLib-8.0.5
#./configure --prefix=/usr/pkg --with-dri-drivers=swrast --disable-driglx-direct --disable-libdrm --with-gallium-drivers=swrast
@nbyouri
nbyouri / xppvc.ksh
Last active August 29, 2015 14:25
xfce_panel-plugins_version-check
#!/bin/ksh
# TODO: Adapt to apps, xfce, art, thunar-plugins
xfce_site="http://archive.xfce.org/src/panel-plugins/"
set -A plugins "xfce4-battery-plugin xfce4-calculator-plugin xfce4-cddrive-plugin
xfce4-cellmodem-plugin xfce4-clipman-plugin xfce4-cpufreq-plugin
xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict-plugin
xfce4-diskperf-plugin xfce4-embed-plugin xfce4-equake-plugin
@nbyouri
nbyouri / xfce_src_version_check.ksh
Last active August 29, 2015 14:26
xfce src version checker
#!/bin/ksh
# Check xfce package versions against pkgsrc. Produce a markdown table.
xfce_site="http://archive.xfce.org/src/xfce/"
set -A pkgs "exo garcon gtk-xfce-engine libxfce4ui libxfce4util thunar-desktop-pkg
thunar-volman thunar tumbler xfce4-appfinder xfce4-dev-tools xfce4-docs xfce4-panel
xfce4-power-manager xfce4-session xfconf xfdesktop xfwm4"
@nbyouri
nbyouri / onlydownloaddontask.diff
Last active August 29, 2015 14:27
Don't ask for install confirmation when only downloading. (pkgin -d in <pkg>)
diff --git a/actions.c b/actions.c
index ea80c3d..766486b 100644
--- a/actions.c
+++ b/actions.c
@@ -465,7 +465,7 @@ pkgin_install(char **opkgargs, uint8_t do_inst)
printf("\n");
- if (upgradenum > 0) {
+ if (do_inst && upgradenum > 0) {
diff --git a/pkgin.h b/pkgin.h
index ab277f4..2299986 100644
--- a/pkgin.h
+++ b/pkgin.h
@@ -193,6 +193,17 @@ typedef struct Pkglist {
SLIST_ENTRY(Pkglist) next;
} Pkglist;
+/**
+ * \struct Pkgdesc
@nbyouri
nbyouri / pkgin.diff
Last active August 28, 2015 22:49
pkgin_check_cmd_before_updating
diff --git a/main.c b/main.c
index 06ad92b..eec68ae 100644
--- a/main.c
+++ b/main.c
@@ -122,7 +122,12 @@ main(int argc, char *argv[])
/* NOTREACHED */
}
- /* initializations */
+ /* initializations if a correct cmd is entered */
@nbyouri
nbyouri / ctwm-import-src.diff
Created September 3, 2015 12:21
CTWM import to NetBSD
Index: distrib/sets/lists/base/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/mi,v
retrieving revision 1.1113
diff -u -r1.1113 mi
--- distrib/sets/lists/base/mi 27 Aug 2015 14:04:07 -0000 1.1113
+++ distrib/sets/lists/base/mi 3 Sep 2015 12:19:24 -0000
@@ -84,6 +84,7 @@
./etc/X11/rstart/commands base-x11-root
./etc/X11/rstart/commands/x11r6 base-x11-root
@nbyouri
nbyouri / cesar.c
Last active September 20, 2015 14:18
Décodage Cesar
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
/*
*
* N = [0 ; 25]
*
@nbyouri
nbyouri / get_battery_percentage_netbsd.c
Last active May 29, 2016 22:55
get_battery_percentage_netbsd
/* taken from defora */
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/envsys.h>
#include <fcntl.h>