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
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]"
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.
rhtyd / mp4-to-mp3
Created Oct 18, 2010
Converts Mp4 in a dir to mp3
View mp4-to-mp3
#! /bin/bash
# Converts all MP4 files in the current directory to MP3s.
# Uncomment to remove whitespaces in mp4 files
for video in *.MP4; do
#f=`echo $video | tr ' ' '_'`
#mv "$video" $f
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
oraccha / linux-0.01-rm-3.5-rt20110112a.patch
Created Jan 12, 2011
Linux 0.01: fix compile errors with gcc 4.4.5
View linux-0.01-rm-3.5-rt20110112a.patch
diff -rc linux-0.01-rm-3.5.orig/fs/Makefile linux-0.01-rm-3.5/fs/Makefile
*** linux-0.01-rm-3.5.orig/fs/Makefile 2008-01-14 05:58:48.000000000 +0900
--- linux-0.01-rm-3.5/fs/Makefile 2011-01-12 18:23:37.336449408 +0900
*** 3,9 ****
CC =gcc
LD =ld
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
! -fno-stack-protector -nostdinc -I../include
CPP =gcc -E -nostdinc -I../include
idosela / http-response-interceptor.js
Last active Jul 18, 2018
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)/;
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);
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
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).

jvns /
Last active Nov 13, 2019
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.