Skip to content

Instantly share code, notes, and snippets.

View iomonad's full-sized avatar
🍋
λ

iomonad iomonad

🍋
λ
  • 16:04 (UTC +03:00)
View GitHub Profile
--- backend/cfg-obj.c
+++ backend/cfg-obj.c
@@ -1026,7 +1026,7 @@
char *vendor = NULL;
char *model = NULL;
- sscanf (string, "%*s %as %as", &vendor, &model);
+ sscanf (string, "%*s %ms %ms", &vendor, &model);
if (list_append (_cfg->seen[CFG_KEY_SCSI], info))
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/fanotify.h>
#include <unistd.h>
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <unistd.h>
int main (int argc, char *argv[]) {
if (argc != 2) {
@iomonad
iomonad / salut.s
Created December 12, 2019 16:22
Hello world
global _start
section .text
_start:
mov eax, 0x04 ; write(
mov ebx, 1 ; STDOUT,
mov ecx, m ; "Salut",
mov edx, ml ; sizeof("Salut")
int 0x80 ; );
mov eax, 0x01 ; exit(
@iomonad
iomonad / .Xdefaults
Created November 12, 2019 11:14
FVWM 2002 Setup
!!!!!!! Muh(fia
!!!! X
! Resources
!!!! Brah
!WE WANT DA FONT
URxvt.font: -beastie-gohufontmod11-*-*-*-*-11-*-100-*-*-*-iso8859-1
URxvt.boldFont: -beastie-gohufontmod11-*-*-*-*-11-*-100-*-*-*-iso8859-1
! cause shell to be started as login shell
URxvt*loginShell: true
@iomonad
iomonad / stupid.cxx
Created October 15, 2019 15:14
sLiDeR iN CpLuSpLuS
while (x --\
\
\
\
> 0)
printf("%d ", x);
@iomonad
iomonad / amqpsub.hs
Created October 9, 2019 13:47
AMQP Subscribe Haskell
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Pipes
import Network.AMQP
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as BL
main :: IO ()
main = do
@iomonad
iomonad / gist:a8a6a3b029bd9ea2400c807e4dac7952
Created October 8, 2019 13:51 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@iomonad
iomonad / fibo.apl
Created October 1, 2019 15:04
Binet’s Formula implemented in APL.
fib←{r÷⍨-/⍵*⍨2÷⍨1+1 ¯1×r←5*0.5}
fib¨⍳10
⍝ 0 1 1 2 3 5 8 13 21 34
@iomonad
iomonad / bulkimport.py
Last active September 25, 2019 16:14
Bulk import raster file in QGis
import os
import sys
import glob
from qgis.core import (
QgsProject,
QgsRasterLayer,
QgsCoordinateReferenceSystem
)