Skip to content

Instantly share code, notes, and snippets.

View nhatzHK's full-sized avatar

Hantz V nhatzHK

View GitHub Profile
# Maintainer: Lionel Peller <errpell@protonmail.com>
pkgname=trinity-matrix-git
pkgver=r21.b8ed76c
pkgrel=1
pkgdesc="Qt5 QML Matrix client"
arch=('x86_64')
url="https://github.com/invghost/Trinity.git"
license=('GPL3')
depends=('qt5-declarative' 'cmark')
makedepends=('git')
@nhatzHK
nhatzHK / rm.c
Created February 21, 2018 23:06
#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <stdlib.h>
#include <ftw.h>
static int rmFiles(const char *pathname, const struct stat *sbuf, int type, struct FTW *ftwb)
{
if(remove(pathname) < 0)
{
perror("ERROR: remove");
@nhatzHK
nhatzHK / config.json
Last active December 1, 2021 11:46
Boilerplate for discord bot with python/discord.py
{
"prefix" : "::",
"token" : "get your token from discord"
}
@nhatzHK
nhatzHK / nhatz.sh
Created June 8, 2017 23:56
I was dumb enough to not modify path
#!/usr/bin/sh
# Execute the script specified as argument
# Directory where the script are stored
baseDir=/opt/nhatz_bash
passed_args=("$@") #list of provided arguments stored in new array
comm=$1 #script/command to call, first on the list
comm_pos=0 #position of $comm in the array
@nhatzHK
nhatzHK / xserverrc
Created April 4, 2017 19:16
xserrc 2017 Apr 4
#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR
@nhatzHK
nhatzHK / ~\.xinitrc
Created April 4, 2017 18:56
~/.xinitrc 2017 Apr 4.
#!/bin/sh
# The \ in the name is because github is complaining about /
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
package ca.qc.bdeb.inf202.h17tp1;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.Arrays;
public class FermeTest {
#include "h_ennemy.h"
H_Ennemy::H_Ennemy() {
setRect(0, 0, 50, 10);
collisionList = collidingItems();
QTimer * ennemyTimer = new QTimer();
connect(ennemyTimer, SIGNAL(timeout()), this, SLOT(move()));
ennemyTimer->start(10); //timeout shorter because I update the list in the move slot
}