Skip to content

Instantly share code, notes, and snippets.

@ziahamza
ziahamza / keybase.md
Created April 12, 2020 00:54
keybase.md

Keybase proof

I hereby claim:

  • I am ziahamza on github.
  • I am hzia (https://keybase.io/hzia) on keybase.
  • I have a public key ASBjih4F59GEgux8dewBb-OkET5v08p_jQGuVPhq9V97Mwo

To claim this, I am signing this object:

@ziahamza
ziahamza / Bug Fix.md
Last active August 31, 2020 05:14
Ticket Templates

Scenario

  • Open Chrome on Windows
  • Log in and navigate to '...'
  • Select ...

Expected result

  • The page should show ...

Actual result

  • The page instead shows ...
@ziahamza
ziahamza / main.cpp
Created March 5, 2018 21:13
Getting WebRTC offers from latest version of Chromium WebRTC library
#include <iostream>
#include "webrtc/pc/peerconnectionfactory.h"
#include "webrtc/api/mediastreaminterface.h"
#include "webrtc/api/datachannelinterface.h"
#include "webrtc/api/peerconnectioninterface.h"
#include "webrtc/api/test/fakeconstraints.h"
using namespace std;
class TestConnectionObserver : public webrtc::PeerConnectionObserver
{
@ziahamza
ziahamza / Dockerfile
Created August 29, 2017 11:29
Rainforest Docker Scripts
FROM ruby:2.4.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs cmake postgresql-client
RUN mkdir /rainforest
WORKDIR /rainforest
ADD ../Rainforest/Gemfile /rainforest/Gemfile
ADD ../Rainforest/Gemfile.lock /rainforest/Gemfile.lock
RUN bundle install
ADD ../Rainforest /rainforest
@ziahamza
ziahamza / fabfile.py
Last active January 16, 2017 10:30 — forked from arikfr/fabfile.py
re:dash fabfile
#!/usr/bin/env python
# vim: ts=4:sw=4:expandtab:autoindent:
import os
import sys
import requests
import filecmp
from fabric.context_managers import hide, settings, prefix
from fabric.api import sudo, task, run, cd, env
from fabric.contrib.console import confirm
from fabric.colors import green
Name: Hamza Zia
Date of Birth: 4 Dec, 1993
Current Location: Dietikon, Zurich, Switzerland
Introduction
------------
I work, travel and study at the same time. Highly passionate computer geek. Deply in love with Unix, C, Haskell, Rust (recently), Go, Javascript (NodeJS!!), C# (sometimes) and the Linux kernel.
Past Internship/Work Experience
-------------------------------
@ziahamza
ziahamza / server.js
Created September 18, 2012 17:37
trivial/simple nodejs document viewer, uses unoconv to convert docs and allows to preview pdf, docx and all libre office supported extentions right from the browser
var http = require('http'),
fs = require('fs'),
path = require('path'),
exec = require('child_process').exec;
function pipeDoc(inputPath, finalType, stream) {
var finalPath = path.dirname(inputPath)
+ "/" + path.basename(inputPath).split('.')[0] + ".html";
var convCommand = 'unoconv -f ' + finalType + " " + inputPath;
exec(convCommand,function(err, stdout, stderr) {