Skip to content

Instantly share code, notes, and snippets.

View arangates's full-sized avatar
🔬
Gedankenerfahrung

Aranganathan Rathinavelu arangates

🔬
Gedankenerfahrung
View GitHub Profile
{
"lighthouseVersion": "2.3.0",
"generatedTime": "2017-08-08T14:12:46.823Z",
"initialUrl": "https://vedhabase.firebaseapp.com/",
"url": "https://vedhabase.firebaseapp.com/",
"audits": {
"is-on-https": {
"score": true,
"displayValue": "",
"rawValue": true,
@arangates
arangates / example.component.ts
Created December 11, 2017 08:10 — forked from ckimrie/example.component.ts
Example on how to achieve RxJS observable caching and storage in Angular 2+. Ideal for storing Http requests client side for offline usage.
import { Component, OnInit, OnDestroy } from '@angular/core';
import {Http} from "@angular/http";
import { LocalCacheService } from "./local-cache.service";
@Component({
selector: 'app-example',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class ExampleComponent implements OnInit, OnDestroy {
@arangates
arangates / httpparams.service.ts
Created February 26, 2018 11:03 — forked from anonymous/httpparams.service.ts
Abgular 5 HTTPS params conversion
function toHttpParams(params) {
return Object.getOwnPropertyNames(params)
.reduce((p, key) => p.set(key, params[key]), new HttpParams());
}
// Example:
toHttpParams({firstName: 'John', lastName: 'Doe'});
@arangates
arangates / meta-tags.md
Created March 29, 2018 14:17 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@arangates
arangates / seo.service.ts
Created March 29, 2018 14:23 — forked from nhathiwala/seo.service.ts
SEO Service for Angular 4+
import { Injectable } from '@angular/core';
import { Meta, Title } from '@angular/platform-browser';
export interface TypingSEO {
title?: string;
titleSuffix?: string;
description?: string;
image?: string;
keywords?: string;
url?: string;
@arangates
arangates / gita.json
Created August 20, 2018 10:18
Bagawad gita json
[
{
"id": 0,
"title": 1.1,
"devanagari": "धृतराष्ट्र उवाच ।\nधर्मक्षेत्रे कुरुक्षेत्रे समवेता युयुत्सवः\nमामकाः पाण्डवाश्चैव किमकुर्वत सञ्जय ॥ १.१ ॥",
"verse_text": "dhṛtarāṣṭra uvāca\ndharma-kṣetre kuru-kṣetre\nsamavetā yuyutsavaḥ\nmāmakāḥ pāṇḍavāś caiva\nkim akurvata sañjaya",
"verse_text_no_samdhis": "dhṛtarāṣṭraḥ uvāca dharma kṣetre kuru kṣetre samavetāḥ yuyutsavaḥ māmakāḥ pāṇḍavāḥ ca eva kim akurvata sañjaya"
},
{
"id": 1,
{
"1": "Chapter 1",
"2": "Chapter 2",
"3": "Chapter 3",
"4": "Chapter 4",
"5": "Chapter 5",
"6": "Chapter 6",
"7": "Chapter 7",
"8": "Chapter 8",
"9": "Chapter 9",
@arangates
arangates / Autosize.ts
Created October 19, 2018 10:08
Angular autoresize textarea directive
import {
Directive,
ElementRef,
Input,
AfterViewInit,
DoCheck,
OnDestroy,
NgZone,
} from '@angular/core';
import {Platform} from '@angular/cdk/platform';
@arangates
arangates / AesJava.java
Created December 19, 2018 03:34
AES encryption + decryption
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.spec.IvParameterSpec;
@arangates
arangates / Music-classification-into-genres.py
Created June 23, 2019 17:42 — forked from sdoshi579/Music-classification-into-genres.py
Model generated to classify extracted features from music clips into different genres
import librosa
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import os
import csv
# Preprocessing
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder, StandardScaler