Skip to content

Instantly share code, notes, and snippets.

View foxoman's full-sized avatar

Sultan Al Isaiee foxoman

View GitHub Profile
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4
@foxoman
foxoman / randomizer.qml
Created February 3, 2019 16:49
Number Randomizer with Qt/Qml
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Window 2.12
import QtQuick.Layouts 1.12
ApplicationWindow {
id: root
visible: true
@foxoman
foxoman / main.cpp
Created June 21, 2018 10:42 — forked from ynonp/main.cpp
QProcess output example
#include <QCoreApplication>
#include <QtCore/QtCore>
#include "monitor.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QProcess p;
p.start("/bin/ls");
@foxoman
foxoman / example.qml
Created May 21, 2018 22:57 — forked from jdowner/example.qml
How to pass a Qml Component as a signal parameter.
import QtQuick 1.0
Rectangle {
height: 300
width: 400
color: "gray"
// This text element is for visual feedback when the signal fires
Text {
text: "(empty)"
@foxoman
foxoman / zombie-war.cpp
Created May 15, 2018 23:31 — forked from sagebind/zombie-war.cpp
A simple game in C++ for a class exercise.
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
using namespace std;
int createZombie() {
if (rand() % 67 < 10)
return 11;
@foxoman
foxoman / filestream.cpp
Created May 5, 2018 19:16
File Stream Example in Qt
#include <QtCore>
#include <io.hpp>
int main (int argc, char** argv) {
QCoreApplication app (argc, argv);
const QString WELCOME = R"(
+=====================================================+
:: CPU INFORMATION ::
+=====================================================+
@foxoman
foxoman / rand.cpp
Created May 5, 2018 07:13 — forked from fffaraz/rand.cpp
Random number in Qt
#include <QGlobal.h>
#include <QTime>
int QMyClass::randInt(int low, int high)
{
// Random number between low and high
return qrand() % ((high + 1) - low) + low;
}
// Create seed for the random
import QtQuick 2.4
Column {
width: parent.width
height: parent.height
property alias model: columnRepeater.model
Repeater {
id: columnRepeater
@foxoman
foxoman / .clang-format
Created April 8, 2018 19:11 — forked from idelsink/.clang-format
Clang format file.
# clang-format
# Made by: Ingmar Delsink
# idelsink.com
# See http://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Tested with: clang-format version 3.7.1
# General
#########
# The style used for all options not specifically set in the configuration.
@foxoman
foxoman / .gitignore
Created March 26, 2018 22:27 — forked from reagent/.gitignore
Curses + C Example
demo
*.swp