Skip to content

Instantly share code, notes, and snippets.

View vineethvijayan's full-sized avatar
🏠
Working from home

vineethvijayan

🏠
Working from home
View GitHub Profile
@vineethvijayan
vineethvijayan / Enum.swift
Created August 23, 2021 08:23
Enum, Loop, Equatable
import UIKit
//var str = "Hello, playground"
enum direction: String, CaseIterable {
case north
case south
case east
case west
}
import UIKit
//var str = "Hello, playground"
let json = """
{
"sample_data": [
{
"first_name": "vivek",
"age_number": "28",
@vineethvijayan
vineethvijayan / carl-pete-john
Last active August 6, 2021 05:28
carl-pete-eral
// Here You can type your custom JavaScript...
var a;
const userAction = async () => {
const response = await fetch('https://sheltered-depths-74912.herokuapp.com/getUser');
const myJson = await response.json(); //extract JSON from the http response
// do something with myJson
a = myJson
@vineethvijayan
vineethvijayan / Git Read Me Stats
Last active July 28, 2021 16:38
Git Read Me Stats
[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=vineethvijayan&repo=github-readme-stats)](https://github.com/anuraghazra/github-readme-stats)
[![Yangshun's GitHub stats](https://github-readme-stats.vercel.app/api?username=yangshun&show_icons=true&icon_color=586069&text_color=586069&bg_color=fff&line_height=30&hide_title=true&title_color=0366d6)](https://github.com/anuraghazra/github-readme-stats)
[![Vineeth's GitHub stats](https://github-readme-stats.vercel.app/api?username=vineethvijayan&show_icons=true&theme=radical)](https://github.com/anuraghazra/github-readme-stats)
[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=vineethvijayan&layout=compact)](https://github.com/anuraghazra/github-readme-stats)
@vineethvijayan
vineethvijayan / loop through the udemy elements
Last active July 28, 2021 16:40
loop through the udemy elements
// loop through the udemy elements
var wholeList = document.getElementsByClassName('card--learning__details')
for (let item = 0; item < wholeList.length; item++) {
const element = wholeList[item];
const courseLink = element.href
const courseName = element.children[0].children[0].innerText
console.log(courseName, '###' , courseLink)
}
@vineethvijayan
vineethvijayan / gist:c456c96a4aecb8885400976c6ae99392
Last active June 23, 2020 21:31
Firebase PN using curl command
https://android.jlelse.eu/firebase-push-notification-using-curl-command-devoid-backend-e63795d282c4
https://firebase.google.com/docs/cloud-messaging/http-server-ref
curl -X POST --header "Authorization: key=<SERVER KEY>" \
--Header "Content-Type: application/json" \
https://fcm.googleapis.com/fcm/send \
-d "{\"to\":\"<FCM TOKEN>\",\"notification\":{\"body\":\"ENTER YOUR MESSAGE HERE\"}}"
@vineethvijayan
vineethvijayan / gist:ec3502567b99b6bead9fca346f3d4666
Created November 2, 2017 09:38
Firebase PN using curl command
https://android.jlelse.eu/firebase-push-notification-using-curl-command-devoid-backend-e63795d282c4
curl -X POST --header "Authorization: key=<SERVER KEY>" \
--Header "Content-Type: application/json" \
https://fcm.googleapis.com/fcm/send \
-d "{\"to\":\"<FCM TOKEN>\",\"notification\":{\"body\":\"ENTER YOUR MESSAGE HERE\"}"
curl -X POST --header "Authorization: key=<Server key>" \