Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Samarth Agarwal samarthagarwal

🎯
Focusing
View GitHub Profile
@samarthagarwal
samarthagarwal / task.php
Last active Sep 6, 2019
A simple task for a secret operation ;)
View task.php
<?php
$date = date('d-m-Y');
$currentMonth = explode("-", $date)[1];
$currentYear = explode("-", $date)[2];
$response = array();
for ($i = $currentMonth; $i <= 12; $i++) {
View chat_message.dart
import 'package:flutter/material.dart';
import 'package:jesuskids/models/message.dart';
import 'package:jesuskids/utilities/utilities.dart';
class ChatMessageLeft extends StatelessWidget {
ChatMessageLeft({this.message, this.animationController});
final Message message;
final AnimationController animationController;
@override
Widget build(BuildContext context) {
View home.page.ts
import { Component } from '@angular/core'
import { Storage } from '@ionic/storage'
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
View home.page.ts
import { Component } from '@angular/core'
import { Storage } from '@ionic/storage'
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
View ap.module.ts
\!h import { IonicStorageModule } from '@ionic/storage';
@NgModule({
declarations: [
// ...
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
\!h IonicStorageModule.forRoot()
View ap.module.ts
\!h import { IonicStorageModule } from '@ionic/storage';
@NgModule({
declarations: [
// ...
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
],
View app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule, RouteReuseStrategy, Routes } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
@samarthagarwal
samarthagarwal / main.dart
Created Sep 13, 2018
Wrote for Facebook post in Let's FLutter
View main.dart
import "dart:core";
void main() {
String url = "http://www.xyz.com/images/cat_53x53xyz.jpg";
//You can replace xyz with any string and it will still work
String newURL = changeSizeInUrl(url);
}
View home.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonicModule } from '@ionic/angular';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { HomePage } from './home.page';
import { StudioPage } from '../studio/studio.page';
import { ClubPage } from '../club/club.page';
import { OfficePage } from '../office/office.page';
View home.page.html
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-button>
<ion-icon slot="icon-only" name="menu"></ion-icon>
</ion-button>
</ion-buttons>
<ion-title>
Ionic Components - Advanced
</ion-title>
You can’t perform that action at this time.