Skip to content

Instantly share code, notes, and snippets.

View ganeshan's full-sized avatar

Ganeshan Venkataraman ganeshan

  • Sterling,MA
View GitHub Profile
@ganeshan
ganeshan / docker-compose.yml
Created December 8, 2019 11:08
elasticsearch docker
version: "2"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0
container_name: elasticsearch
ports:
- "9200:9200"
- "9300:9300"
volumes:
- esdata:/usr/share/elasticsearch/data
@ganeshan
ganeshan / docker_wordpress.md
Created December 10, 2019 12:30 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@ganeshan
ganeshan / main.cs
Created December 11, 2019 10:02 — forked from mythz/main.cs
OrmLite Many to Many Post Example
using System;
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
var dbFactory = new OrmLiteConnectionFactory(":memory:", SqliteDialect.Provider);
var db = dbFactory.Open(); // Open ADO.NET DB Connection
@ganeshan
ganeshan / console.js
Created December 22, 2019 00:00 — forked from Harshmakadia/console.js
Mastering JS console like a Pro
// time and time end
console.time("This");
let total = 0;
for (let j = 0; j < 10000; j++) {
total += j
}
console.log("Result", total);
console.timeEnd("This");
// Memory
@ganeshan
ganeshan / index.html
Created January 12, 2020 08:44 — forked from shiawuen/index.html
Sample to upload file by chunk
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>test upload by chunk</title>
</head>
<body>
<input type="file" id="f" />
<script src="script.js"></script>
@ganeshan
ganeshan / JS-LINQ.js
Created January 17, 2020 16:29 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
@ganeshan
ganeshan / brew_packages.txt
Created January 18, 2020 15:20
Useful Brew Packages
ack
azure-cli
bison
boost
curl
erlang
erlang@20
gcc
gdal
glib
@ganeshan
ganeshan / guide.sh
Created March 30, 2020 09:41 — forked from mebens/guide.sh
Setting up an up-to-date LAMP stack server on Ubuntu 18.04
# Script correlating to tutorial at http://ebens.me/post/install-lamp-stack-ubuntu
# Even though you probably could, don't run it all at once
# new user
adduser new_user
usermod -a -G sudo new_user
su - new_user
# new repos
apt-get update -o Aquire::ForceIPv4=true
foo bar baz
a 1
b 2
c
4
e 5