Skip to content

Instantly share code, notes, and snippets.

View vin-the-dev's full-sized avatar
:electron:
Focusing

Vineeth Vijayan vin-the-dev

:electron:
Focusing
View GitHub Profile
@vin-the-dev
vin-the-dev / Find Next Day
Created March 17, 2022 09:09
Find Next Day
function getDay(day) {
let searchDay = -1
switch (day.toLowerCase()) {
case 'sunday':
searchDay = 0
break;
case 'monday':
searchDay = 1
break;
case 'tuesday':
import 'dart:async';
import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
import 'service_entry.dart';
class HomePage extends StatefulWidget {
static String tag = 'home-page';
@vin-the-dev
vin-the-dev / Colors.swift
Created March 6, 2018 10:32
The power of Color Sets in Xcode9
enum AppColor:String {
case AppClearColor
case AppGrayColor
case AppWhiteColor
case PrimaryColor
case PrimaryColor1
case PrimaryColor2
case PrimaryColor3
case SecondaryColor1
case ThemeColor
pod 'pop', '~> 1.0'
pod 'EZSwiftExtensions'
// ==UserScript==
// @name relaod
// @namespace reload
// @description relaod
// @include http://10.201.1.14:8094/*
// @version 1
// @grant none
// @noframes
// ==/UserScript==
@vin-the-dev
vin-the-dev / Load TableView in xib
Last active April 6, 2016 09:24
Load TableView in xib
// Create a xib with TableView
// Create a xib with TableViewCell
// Connect the TableViewCell xib to a class
//http://stackoverflow.com/questions/24056183/uitableview-using-swift
//http://stackoverflow.com/questions/26081287/required-initializer-initcoder-must-be-provided-by-subclass-of-uitablevi?rq=1
//swift file of TableViewCell
class TapCell1: UITableViewCell {
@vin-the-dev
vin-the-dev / CustomPageRenderer.swift
Last active November 29, 2018 16:31
PDF Creation from iOS swift
//
// CustomPageRenderer.swift
// (c) 2016 Vineeth Vijayan, licensed under the MIT License
// Inspired by https://gist.github.com/mattt/bd5e48ae461848cdbd1e#file-recipepagerenderer-swift
import UIKit
import AVFoundation
/// Units for printing content insets
let POINTS_PER_INCH: CGFloat = 72