Skip to content

Instantly share code, notes, and snippets.

View teswar's full-sized avatar

Thirueswaran Rajagopalan teswar

View GitHub Profile
@leggetter
leggetter / gist:769688
Created January 7, 2011 16:23
How to get the body of a HTTP Request using C#
private string GetDocumentContents(System.Web.HttpRequestBase Request)
{
string documentContents;
using (Stream receiveStream = Request.InputStream)
{
using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
{
documentContents = readStream.ReadToEnd();
}
}
@danielkillyevo
danielkillyevo / baseodatacontroller.cs
Created September 26, 2013 21:19
Generic OData WebAPI controller
public class BaseOdataController<TRepository, TEntity> : EntitySetController<TEntity, int>
where TRepository : IRepository<TEntity>
where TEntity : class
{
private readonly IUnitOfWork _unitOfWork;
private readonly TRepository _repository;
public BaseOdataController(IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork;
@lili2311
lili2311 / Snake-Game-using-Canvas.markdown
Created April 25, 2014 13:25
A Pen by Liliana Kastilio.
@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing
@alexhawkins
alexhawkins / binaryTree.js
Last active October 16, 2022 20:27
Binary Trees and Tree Traversal
'use strict';
function BinarySearchTree() {
this.root = null;
}
BinarySearchTree.prototype.makeNode = function(value) {
var node = {};
node.value = value;
node.left = null;
@timabell
timabell / sourced.ai spam.md
Last active December 8, 2016 15:57
unsolicited mail by farming my OSS publications. douchebags.

completely irrelevant, if they'd bothered to actually look they'd have known that. reading github doesn't make your automated spam bullshit any more acceptable. wankers.

Oh and pick one domain and stick to it ffs. Idiots. Which is it, http://sourced.ai/ or http://sourced.tech/

I don't mind people (humans) reading my published stuff and contacting my personally, but the below is unacceptable.

From your webshite:

We send highly relevant job proposals to the suggested profiles and inform them about all the aspects of the position.

@tejacques
tejacques / HOCBaseRender.tsx
Last active May 2, 2022 13:05
React Higher Order Components in TypeScript
import * as React from 'react';
import { Component } from 'react';
export default function HOCBaseRender<Props, State, ComponentState>(
Comp: new() => Component<Props & State, ComponentState>) {
return class HOCBase extends Component<Props, State> {
render() {
return <Comp {...this.props} {...this.state}/>;
}
}
@lmcneel
lmcneel / remove-node-modules.md
Last active June 22, 2024 15:08
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a

Adding manpower to a late software project makes it later.

Development managers often win their management roles primarily from having been stellar coders while displaying a modicum of people skills.

Programming teams can tell management that the product is one week from being functionally complete every week for the months.

A program can produce the desired results and be so poorly designed and/or executed that it cannot realistically be enhanced or maintained.

For too many managers (especially less technical managers, such as CEOs or CFOs) prototypes appear to be “done.”

@guillaumegarcia13
guillaumegarcia13 / sample.html
Created September 4, 2017 15:53
Angular 4 ng-template & ng-container with parameters
<ng-template #followingpost let-author="author" let-age="age" let-text="text" let-badge="badge">
<div class="container-fluid">
<div class="card">
<div class="header">
<h4 class="title">{{ author }}</h4>
<p class="category">il y a {{ age }} jours</p>
</div>
<div class="content" [innerHTML]="text">
</div>