Skip to content

Instantly share code, notes, and snippets.

View deostroll's full-sized avatar
😄
indeed...!

arun.jayapal deostroll

😄
indeed...!
View GitHub Profile
@deostroll
deostroll / Program.cs
Created June 6, 2016 08:30
correctly redirecting i/o to a process started via a c#
using System;
using System.Diagnostics;
using System.IO;
namespace caStreamedInput
{
class Program
{
static string Ask()
{
@deostroll
deostroll / README.md
Last active June 1, 2016 11:14
upload concat response

Express web app that exposes and upload endpoint.

Upload three files to it. Post successful upload of 3rd file a response is returned to each client

use cURL as client, but not mandatory.

class Direction:
Horizontal = 0
Vertical = 1
class Board:
def __init__(self, size):
board = []
rng = range(size)
for x in rng:
@deostroll
deostroll / script.sh
Created March 25, 2016 06:43
script to wait for process in bash shell
pid=$1
echo "pid is $pid"
check=1
while [ "$check" = "1" ]
do
val=$(ps | grep $pid | awk '{printf $1}')
#echo "$val"
if [ "$val" = "$pid" ]; then
http://www.virusresearch.org/how-to-remove-micro-file-extension-malware/
package com.example.deostroll.vidsync;
import android.os.AsyncTask;
import android.os.Handler;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
@deostroll
deostroll / debug.cs
Created January 13, 2016 08:43
c# enumerating object properties/values...helps in debugging
public static Dictionary<string, object> _dict(object atype)
{
if (atype == null) return new Dictionary<string, object>();
Type t = atype.GetType();
System.Reflection.PropertyInfo[] props = t.GetProperties();
Dictionary<string, object> dict = new Dictionary<string, object>();
foreach (System.Reflection.PropertyInfo prp in props)
{
object value = prp.GetValue(atype, new object[] { });
dict.Add(prp.Name, value);
@deostroll
deostroll / index.html
Last active December 11, 2015 12:09
todo app stuff
<!DOCTYPE html>
<html lang="en" ng-app="myapp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>My Awesome TODO Items</title>
<!-- Bootstrap -->

Getting Started with ES6

So you want to start with ES6!

Great! There are many ways to get started but I am just going to give you the bare minimum information. I would encourage you to explore the rest.

The tools you minimally need:

  • node/npm
  • git
@deostroll
deostroll / index.js
Created December 8, 2015 06:11
node.js cluster
var cluster = require('cluster');
if(cluster.isMaster) {
var cpus = require('os').cpus().length;
for(var i = 0; i < cpus; i++) {
cluster.fork();
}
}
else {
//! Yay! so this is executed in a worker...