Skip to content

Instantly share code, notes, and snippets.

View Ademking's full-sized avatar
🍪
Eating Cookies

Adem Kouki Ademking

🍪
Eating Cookies
View GitHub Profile
@Ademking
Ademking / readme.md
Last active July 20, 2018 03:11
💙 Ionic 3 : Force Portrait/Landscape in your app
  1. run :
$ ionic cordova plugin add cordova-plugin-screen-orientation
$ npm install --save @ionic-native/screen-orientation
  1. src/app.module.ts should look like this:
@Ademking
Ademking / Note.md
Last active July 20, 2018 03:11
💙 Ionic : How to serve on Device (with live Reload)

Just to Remember :

ionic cordova run android --device --livereload

if you face any problem, just add Android / ios to Cordova :

cordova platform add android
@Ademking
Ademking / TOP100.md
Last active July 20, 2018 03:13
😃 SQL : get top100 score in table (useful)
SELECT
  SUM(column) AS Top_Scores, user_id, COUNT(rating) as number_of_times
FROM Table
GROUP BY user_id
ORDER BY SUM(column) DESC LIMIT 100
@Ademking
Ademking / readme.md
Last active July 20, 2018 03:13
🌐 WEB : Progress bar while page loading
@Ademking
Ademking / LoginController.php
Last active July 20, 2018 03:14
❤️ Laravel : (5.5) : Allow login using username or email
// in app/Http/Controllers/Auth/LoginController.php
<?php
/*
* code ...
*/
use AuthenticatesUsers;
protected function credentials(Request $request)
@Ademking
Ademking / media-query.css
Last active July 20, 2018 03:14 — forked from gokulkrishh/media-query.css
🌐 Web : CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@Ademking
Ademking / readme.md
Created July 22, 2018 01:55
💙 Ionic 3 : Add custom HTML Tag to your app - Solution

To use custom tags (in my example A-frame) :

<a-scene>
      <a-sky src="https://i.imgur.com/dneNDgI.jpg" rotation="0 -20 0"></a-sky>
    </a-scene>

in your app.module.ts :

@Ademking
Ademking / readme.md
Last active July 23, 2018 16:27
💙 Ionic 3: Fabs with label

in SCSS add :


button[ion-fab] {
  overflow: visible;
  position: relative;

  ion-label {
 position: absolute;
@Ademking
Ademking / readme.md
Last active July 23, 2018 23:26
💙 Ionic 3: Make "Back" Hardware Button return to last page (Solution)

In your app.component.ts

import { Component } from '@angular/core';
// DON'T FORGET TO ADD 'App' ...
import { Platform, App } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { HomePage } from '../pages/home/home';
@Ademking
Ademking / readme.md
Created July 24, 2018 23:55
💙 Ionic 3: Build & Publish Commands...

1. Generate Unsigned APK

ionic cordova build android --prod --release

2. Generate Key

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000