Skip to content

Instantly share code, notes, and snippets.


Faraz Fallahi fffaraz

View GitHub Profile
View https_forward_proxy.js
// HTTP forward proxy server that can also proxy HTTPS requests
// using the CONNECT method
// requires
var httpProxy = require('http-proxy');
var url = require('url');
var net = require('net');
var http = require('http');
View farsi.html
<!DOCTYPE html>
<meta charset="UTF-8">
<p><textarea rows="15" cols="100" id="src"></textarea></p>
<p><textarea rows="15" cols="100" id="dest" dir="rtl"></textarea></p>
View StringConstant.cpp
#include <iostream>
#include <string>
#include <vector>
#include <stdexcept>
#include <type_traits>
// The following is evil template "black magic". Only because we write it instead
// of the C++ standards committee. This first section is effectively a C++11
fffaraz / index.php
Created Jul 10, 2014
php file listing
View index.php
<table border="1">
$files = scandir(".");
$i = 0;
foreach($files as $entry)
fffaraz /
Last active Apr 17, 2021
Project Ideas List


Reverse a String Enter a string and the program will reverse it and print it out.

Pig Latin Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules.

fffaraz / rand.cpp
Created Jul 22, 2014
Random number in Qt
View rand.cpp
#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
fffaraz /
Created Jul 30, 2014
TCP syn flood in python using raw sockets
Syn flood program in python using raw sockets (Linux)
Silver Moon (
# some imports
import socket, sys
from struct import *
fffaraz /
Last active Nov 6, 2021
CS 306 - Linux/UNIX Programming
View procstat.h
struct StatStuff
int pid; // %d
char comm[256]; // %s
char state; // %c
int ppid; // %d
int pgrp; // %d
int session; // %d
int tty_nr; // %d
int tpgid; // %d