Skip to content

Instantly share code, notes, and snippets.

@mohan43u
mohan43u / testasync.vala
Created June 21, 2015 04:53
async function using vala
#!/usr/bin/env vala
class Test.Async : GLib.Object {
public async string say(string sentence) {
GLib.Idle.add(this.say.callback);
yield;
return sentence;
}
public static int main(string[] args) {
Test.Async myasync = new Test.Async();
@mohan43u
mohan43u / arch_svngit_download
Created November 22, 2015 04:33
download files from archlinux svngit
curl 'https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/xorg-server' | sed 's:/svntogit:\nhttp\://projects.archlinux.com/svntogit:g' | grep plain | sed "s/'.*//g" | while IFS='?' read url suffix; do name=$(basename $url); url="$url?$suffix"; curl -o "${name}" "${url}" ; done
2020-04-11 14:50:40 mbuf We shall begin in 10 minutes
2020-04-11 14:51:03 mohan43u ok
2020-04-11 14:55:36 --> ringmaster62 (~u0_a193@27.5.12.196) has joined #ilugc
2020-04-11 14:55:38 --> protocol255 (~protocol2@103.99.150.216) has joined #ilugc
2020-04-11 14:56:06 <-- protocol255 (~protocol2@103.99.150.216) has quit (Client Quit)
2020-04-11 14:57:15 --> protocol255 (~protocol2@103.99.150.216) has joined #ilugc
2020-04-11 15:00:02 * mbuf Welcome to ILUGC April 2020 monthly meeting
2020-04-11 15:00:18 mbuf Before we begin, I would like to state few conversation guidelines
2020-04-11 15:00:48 mbuf As you might already know, IRC stands for Internet Relay Chat, and for any meeting there is a protocol followed
2020-04-11 15:01:22 --> stylesen (~stylesen@unaffiliated/stylesen) has joined #ilugc
#define _GNU_SOURCE
#include <stdio.h>
#include <sched.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
2020-05-09 15:00:32 mbuf Hello, and welcome to the monthly ILUG-C meet-up!
2020-05-09 15:01:19 shrini hello all
2020-05-09 15:01:22 mbuf We will give few more minutes for people to join, before we begin the sessions
2020-05-09 15:01:26 mbuf shrini, you are the first speaker?
2020-05-09 15:01:37 --> protocol255 (~protocol2@103.99.150.196) has joined #ilugc
2020-05-09 15:01:54 shrini mbuf: yes
2020-05-09 15:02:05 mbuf shrini, the floor is yours!
2020-05-09 15:02:48 shrini hello all,
2020-05-09 15:03:18 shrini Today we are going to discuss about a open source infrastructure monitoring tool called prometheus
2020-05-09 15:03:32 shrini we can use it to monitor anything
2020-06-13 15:00:59 mohan43u Hi everyone
2020-06-13 15:01:09 mohan43u welcome to ILUGC June month meet
2020-06-13 15:01:15 anbazhagan hi
2020-06-13 15:01:51 --> Malaw89 (5c0d9633@gateway/web/cgi-irc/kiwiirc.com/ip.92.13.150.51) has joined #ilugc
2020-06-13 15:01:53 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:02:00 kiwi_92 Hi
2020-06-13 15:02:03 mohan43u our first talk is about emacs 'org-mode' by shrini
2020-06-13 15:02:04 shrini hello all
2020-06-13 15:02:16 mohan43u shrini: please carry on
2020-06-13 15:03:22 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-16 16:00:17 mohan43u-we welcome to ILUGC #irc channel
2020-06-16 16:01:14 mohan43u-we wait for another 5 more mins for people to join
2020-06-16 16:01:46 mohan43u-we I hope everyone can see the presenter terminal
2020-06-16 16:03:09 --> mohan43u-kiwi (~mohan43u-@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-16 16:03:43 stof9-9 link please
2020-06-16 16:04:00 mohan43u-we stof9-9: https://training.ilugc.in
2020-06-16 16:04:09 stof9-9 thanks
2020-06-16 16:04:32 --> famubu__1 (~famubu@117.207.224.45) has joined #ilugc
2020-06-16 16:04:57 mohan43u-we lets start the talk
2020-06-16 16:05:23 mohan43u-we this talk is about 'ed' the text editor

Testing openat2 in systemd-nspawn

Test code

/* openat2_test.c */
/* compile: gcc -O0 -g -static -o openat2_test openat2_test.c */
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
2020-07-06 17:40:11 +mohan43u-we the first thing you do in a shell is to see where you are
2020-07-06 17:40:50 @mohan43u type pwd command to see in which place you are currently present.
2020-07-06 17:41:37 +mohan43u-we the path /home/trainer is the current working directory
2020-07-06 17:41:54 +mohan43u-we in unix, everything is a file
2020-07-06 17:42:07 +mohan43u-we a directory is also a file
2020-07-06 17:42:35 +mohan43u-we a file in unix is stored in one particular tree
2020-07-06 17:42:56 +mohan43u-we unix filesytem starts from root
2020-07-06 17:43:40 +mohan43u-we as you see in the presenter terminal, 'ls /' command will show the directories inside the root
2020-07-06 17:43:51 +mohan43u-we the command 'ls' means list
2020-07-06 17:44:19 +mohan43u-we here '/' represents the root of the file system
2020-07-07 16:51:06 +mohan43u-we hi, channel switched into restricted mode
2020-07-07 16:52:14 @mohan43u only people who have voice mode enabled can speak
2020-07-07 16:59:41 +mohan43u-we good evening all
2020-07-07 16:59:56 +mohan43u-we welcome to day 2 of 'sh' Posix shell session
2020-07-07 17:00:21 +mohan43u-we today we will be covering the topics which I'm showing in the Presenter Terminal now
2020-07-07 17:01:02 +mohan43u-we I hope all of you will be able to see the presenter terminal
2020-07-07 17:01:36 +mohan43u-we lets begin
2020-07-07 17:01:52 +mohan43u-we lets talk about man pages
2020-07-07 17:02:55 +mohan43u-we yesterday we saw simple unix commands like 'ls'
2020-07-07 17:02:58 +mohan43u-we 'cd'