Skip to content

Instantly share code, notes, and snippets.

View aggarwalankush's full-sized avatar
👨‍💻
fun, code, repeat

Ankush Aggarwal aggarwalankush

👨‍💻
fun, code, repeat
View GitHub Profile
package solution;
import problem.Pathfinder;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public class MyPathfinder extends Pathfinder {
@aggarwalankush
aggarwalankush / city.list.json
Created November 5, 2016 13:39
openweathermap city list
[{"_id":2610888,"name":"Understed","country":"DK","coord":{"lon":10.51667,"lat":57.383331}},
{"_id":2613685,"name":"Skodsborg","country":"DK","coord":{"lon":12.57324,"lat":55.822498}},
{"_id":2613357,"name":"Smidstrup","country":"DK","coord":{"lon":12.55787,"lat":55.865688}},
{"_id":6460975,"name":"Rastnik","country":"BG","coord":{"lon":25.283331,"lat":41.400002}},
{"_id":727762,"name":"Rastnik","country":"BG","coord":{"lon":25.283331,"lat":41.400002}},
{"_id":596826,"name":"Murava","country":"LT","coord":{"lon":23.966669,"lat":54.916672}}]
@aggarwalankush
aggarwalankush / Sql.ts
Last active December 19, 2019 12:33
Ionic 2 storage
import {Injectable} from "@angular/core";
import {Platform} from "ionic-angular";
const DB_NAME: string = '__mydbname';
const win: any = window;
@Injectable()
export class Sql {
private _dbPromise: Promise<any>;
@aggarwalankush
aggarwalankush / AndroidPush.java
Last active January 18, 2017 14:32
Android Push notification server code
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class AndroidPush {
/**
* Replace SERVER_KEY with your SERVER_KEY generated from FCM
* Replace DEVICE_TOKEN with your DEVICE_TOKEN
*/
@aggarwalankush
aggarwalankush / hortonemail.py
Created July 30, 2016 15:09
Email a file from horton
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email import Encoders
EMAIL_FROM_MESSAGE = '[email protected]'
# comma delimeted string eg. '[email protected], [email protected], [email protected]'
EMAIL_TO_MESSAGE = ['[email protected]','[email protected]']
EMAIL_SUBJECT='Subject'