Skip to content

Instantly share code, notes, and snippets.

View aliostad's full-sized avatar
🐒
I may be slow to respond.

Ali Kheyrollahi aliostad

🐒
I may be slow to respond.
View GitHub Profile
sudo apt-get -y install software-properties-common python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | \
sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | \
sudo debconf-set-selections
sudo apt-get -y install oracle-java8-installer
sudo apt-get update
sudo apt-get install git rake zsh -y
@aliostad
aliostad / azure-vm-bootstrapper.ps1
Last active April 18, 2016 11:04
Azure VM bootstrapper
# Usage:
# iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/aliostad/a20f0c8d6a439dcff34e63e4a6559008/raw/0e445d869eb47e525512053638489920547a7d75/azure-vm-bootstrapper.ps1'))
# Bootstraps the Azure VM by modyifying settings and installing below:
# 1. Turn off annoying Intrenet Explorer enhanced security
# 2. Install chocolatey
# 3. Install PerfView
# 4. Install DebugView
# 5. Install SuperBenchmarker
# 6. Install notepad++
# 7. Install windbg

I am writing this letter, not necessarily in a position to intimidate or threaten (I am mere a consumer, have little power - although I will use all the power that I have, NOW IT IS PERSONAL) but only with a glimmer of hope that perhaps this could end the misery caused by one of your own contractors and all the incompetence that followed. With regret I have to inform you that the level of incompetence in the organisation is baffling and beyond belief - and sadly only comparable to the worst third-world countries. I have been lied to, I have been given false information and given deadlines that are not met.

As a techie (Solution Architect for an international eCommerce), my life is dependent on internet and it has been 21 days that we have had no internet - let alone having no phone. It is years that we have stopped watching TV and only rely on streaming (Netflix, Amazon) for our entertainment. Considering all holidays we could not watch TV... it has been an awful time. And all this, no end in sight... I have

@aliostad
aliostad / word2vec_rock_artist_clustering
Created July 12, 2015 15:32
Clustering [k-means] of Rock artists based on their word2vec vectors - Wikipedia corpus
Peccatum, Destructhor, Silenoz, Blood of Kingu, Abruptum, Hate Forest, Demoniac, Tsjuder, Kaiaphas, Ihsahn, Myrkskog, Maurizio Iacono, John McEntee, Manes, Uli Kusch, Narqath, Incantation, Armored Saint, Charred Walls of the Damned, Ved Buens Ende, Beyond Fear, Ildjarn, Holy Moses, Old Funeral, The Kovenant, Carpe Tenebrum, Chroma Key, Michael Amott, Jim Matheos, Nagelfar, Borknagar, Necrophobic, Blackmoon, Koshi Inaba, Casey Chaos, Arcturus, Schmier, Thou Shalt Suffer, Tormentor
De Staat, The Paupers, Arbovirus, 12012, Juliette Greco, Los Mockers, The Head and the Heart, The Wu Tang Clan, Bass Drum of Death, Tiny Dancers, Telephone Jim Jesus, Ghost Brigade, Pegazus, Angband, Unfact, Cirith Gorgor, Incongruous, Heathers, The Shamrock, December Wolves, Mimi Farina, Obliveon, Headplate, Young Ejecta, Kalijuge, Matt Brain, The Lovely Sparrows, Asa Martin, Lost in Thought, Mad Heads, Rosenstolz, Morgan Harper Nichols, Kaliber, Jacob Golden, Serious Drinking, Randy and the Rainbows, Rose Cousins, Daggermouth,
@aliostad
aliostad / Top 100 Most Influential Rock acts
Created June 29, 2015 22:59
Top 100 Most Influential Rock Figures (Bands/Artists/Producers/Composers)
Top 100 Most Influential Rock figures (according to SNA Betweenness)
====================================================================
U2
Led Zeppelin
Nirvana (band)
Kiss (band)
Emmylou Harris
The Beatles
Beck
@aliostad
aliostad / rock_acts
Created June 29, 2015 21:22
Most influential Rock acts
The Beatles
Bob Dylan
Black Sabbath
U2
Led Zeppelin
Nirvana (band)
Metallica
Pink Floyd
Neil Young
The Rolling Stones
@aliostad
aliostad / App.Config
Last active August 29, 2015 14:15
Tool for benchmarking reads against Azure Table Storage
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
@aliostad
aliostad / utf8-unicode.cs
Created January 18, 2015 22:36
Turns UTF-8 hex representation of the character to its Unicode code in Little Endian
var hex = "d8a7";
var utf8 = Enumerable.Range(0, hex.Length)
.Where(x => x % 2 == 0)
.Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
.ToArray();
var s = Encoding.UTF8.GetString(utf8);
var uni = Encoding.Unicode.GetBytes(s);
Console.WriteLine("0x" + string.Join("", uni.Reverse().Select(x => x.ToString("X"))));
@aliostad
aliostad / es_index_copier
Created December 2, 2014 21:02
Copies an ElasticSearch index between two servers using Bulk method
from __future__ import unicode_literals
import requests
import json
from io import StringIO
from requests.auth import HTTPBasicAuth
import datetime, pytz
def copy_indexes(sourceSearchUrl, destinationBulkUrl, newIndexName=None, newTypeName=None, auth=None):
BatchSize = 40
@aliostad
aliostad / TableStorageDumper.cs
Created November 26, 2014 15:25
Table Storage Dumper
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
namespace TableStorageDumper