Skip to content

Instantly share code, notes, and snippets.

View dnutiu's full-sized avatar
🏠
Working from home

Denis Nuțiu dnutiu

🏠
Working from home
View GitHub Profile
@dnutiu
dnutiu / align_middle.css
Last active June 12, 2016 19:48
HTML START
width: 100px;
height: 100px;
background-color: red;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
@dnutiu
dnutiu / atom
Created January 14, 2016 17:20
ATOM "Open Witgh" BUG FIX
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\
LaunchServices.framework/Versions/A/Support/\
lsregister -kill -r -domain local -domain user
killall Finder
@dnutiu
dnutiu / pyqt_start.py
Created June 21, 2016 16:40
PyQT Help
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
"""
UI Element = UI Widget
Qmain - the main window of the application.
QtDialog - a menu window that's inside the app
Handler = event listener, events that are not handled are disregarded
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 11 /* Slave Select pin, maps to SDA */
#define RST_PIN 6 /* RST pin, a digital pin should suffice*/
/* Create the mfrc522 object */
MFRC522 mfrc522(SS_PIN, RST_PIN);
/* Create the key. They key object will be used for Key A
@dnutiu
dnutiu / main.py
Created May 17, 2017 18:36
Python LCS dynamic programming implementation
"""
Project: A plagiarism detection tool based on the LCS algorithm
optional arguments:
-h, --help show this help message and exit
-p file file, --parse file file
Compare two files
-t dirname, --tabular dirname
Produce a table for each distinct .txt files
// Compare the Triplets
// Metonimie 22 Jun 2017
package main
import (
"bufio"
"fmt"
"os"
)
package main
import (
"net"
"log"
"io"
"os"
"io/ioutil"
"bufio"
"strings"
@dnutiu
dnutiu / go_sorting.go
Last active September 3, 2023 02:10
How to sort custom structs in golang.
package main
import (
"fmt"
"sort"
)
type Student struct {
Name string
Grade int
@dnutiu
dnutiu / character_counter.c
Created October 18, 2017 07:59
character_counter.c operating systems
/*
Fisier txt.
Count letters?
a: 20
b: 55
z: 33
...
@dnutiu
dnutiu / directory.c
Created October 25, 2017 12:45
How to use directories system calls in C
#include <stdio.h>
#include <dirent.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
int OUTPUT_FILE;