Skip to content

Instantly share code, notes, and snippets.


Rohit Yadav rhtyd

Block or report user

Report or block rhtyd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
barosl / add.c
Created Jul 26, 2015
Function overloading in C
View add.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int addi(int a, int b) {
return a + b;
char *adds(char *a, char *b) {
char *res = malloc(strlen(a) + strlen(b) + 1);
View gist:598fa75e22bdfa44cf47

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

imduffy15 /
Created Aug 12, 2014
Apache Cloudstack - Google Summer of Code 2014.

Apache Cloudstack - Google Summer of Code 2014.

As part of Google Summer of Code 2014 (GSoC) I worked with Apache Cloudstack. The project revolved around automating different environments to ease development, testing and production installation.

During the period I was exposed to many different technologies including:

  • Chef: Configuration management tool.
  • Packer: Open Source tool for creating identical machine images from a single source configuration.
  • XenServer: Hypervisor that is supported by Apache Cloudstack.
  • Vagrant: Wrapper around VirtualBox and Configuration management utilities.
staltz /
Last active Feb 18, 2020
The introduction to Reactive Programming you've been missing
chiradeep / provision.rb
Created Apr 29, 2014
Ruby script to ssh into base wheezy template and install stuff necessary for systemvm
View provision.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'net/ssh'
host = ''
user = 'root'
pass = 'root'
options = {}
opt_parser = do |opts|
opts.banner = "Usage: provision.rb IP [options]"
chiradeep /
Last active Oct 23, 2019
LXC script to initiate build of CloudStack LXC systemvm
# tested on Ubuntu 14.04
#set -x
sudo lxc-create --template=debian --name=systemvm -- --release=wheezy
sudo lxc-start -n systemvm -d
sleep 2
ip=$(sudo lxc-info -n systemvm -i | awk '{print $2}')
#start provisioning using ssh
chiradeep /
Created Apr 29, 2014
post-install for a debian wheezy lxc container that installs stuff necessary for a systemvm
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
idosela / http-response-interceptor.js
Last active Feb 12, 2020
Sample code for ng-conf 2014
View http-response-interceptor.js
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
jvns /
Last active Feb 10, 2020
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

You can’t perform that action at this time.