Skip to content

Instantly share code, notes, and snippets.

View foxoman's full-sized avatar

Sultan Al Isaiee foxoman

View GitHub Profile
@foxoman
foxoman / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@foxoman
foxoman / tcp_bbr.sh
Last active February 21, 2017 11:19 — forked from StoneMoe/tcp_bbr.sh
Enable tcp_bbr for your debian/ubuntu (tested on debian)
#write config
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
#apply config
sysctl -p
#set fq to eth
sudo tc qdisc replace dev eth0 root fq pacing
@foxoman
foxoman / AndroidDevLinux
Created April 22, 2017 15:28 — forked from venkateshshukla/AndroidDevLinux
Setting up your Linux for Android Application Development
Step 1. Preparation
--------------------
First take care of the dependencies for Android Application Development.
Dependencies are -
1. Java
2. ant
3. Eclipse and Android Development tools (IDE)
4. Android SDK and NDK
5. adb
@foxoman
foxoman / README.md
Created September 11, 2017 05:14 — forked from technic/README.md
change font linespacing for dummy editor #linux #ttf #qtcreator

How to change font linespacing

Manual

You need to manipulate a ttf file. I found such a script that comes with Input font at http://input.fontbureau.com. So we copy DejaVuSansMono ttf files to ~/.fonts/ and create a new font DejaVuSansMonoH. I changed line 147, to match this font name, and run

@foxoman
foxoman / ncurses_stl.cpp
Created March 25, 2018 13:21 — forked from daleobrien/ncurses_stl.cpp
A general purpose example of using ncurses in C++ e.g. with STL strings. Note: copied from http://pastebin.com/jRK9C129
/* ncurses C++
*
* A general purpose example of using ncurses in C++ e.g. with STL strings.
* I guess whatever license ncurses uses applies, otherwise public domain.
*/
# include <algorithm>
# include <iostream>
# include <fstream>
# include <iterator>
@foxoman
foxoman / .gitignore
Created March 26, 2018 22:27 — forked from reagent/.gitignore
Curses + C Example
demo
*.swp
@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.
import QtQuick 2.4
Column {
width: parent.width
height: parent.height
property alias model: columnRepeater.model
Repeater {
id: columnRepeater
@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
@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;