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 September 20, 2018 03:32
💙 Ionic 3 : Iframe reloads after showing Keyboard (Solution)
@Ademking
Ademking / readme.md
Created September 20, 2018 04:52
💙 Ionic 3 : listening to Keyboard events (show, hide..)
  1. app.module.ts :
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
@Ademking
Ademking / app.js
Created September 20, 2018 12:52
LinkedIn Auto Liker
/** By Adem Kouki
/** Facebook : https://facebook.com/Ademkouki.Officiel
/** GitHub : https://github.com/Ademking
/**
/** LinkedIn Auto Liker - This tool will help you to increase your Linkedin Popularity ...
/**
*/
(function() {
console.log('By Adem Kouki : https://facebook.com/Ademkouki.Officiel');
let index = 0;
@Ademking
Ademking / readme.md
Last active September 30, 2018 13:27
💙 Ionic 3 : Custom icons using SVG
  1. Open app.scss and add this :
ion-icon {
  &[class*="appname-"] {
      mask-size: contain;
      mask-position: 50% 50%;
      mask-repeat: no-repeat;
      background: currentColor;
 width: 1em;
@Ademking
Ademking / memoryGame.cpp
Created November 21, 2018 18:21
Memory Game
#include <iostream>
#include <cstdlib>
#include <time.h>
#include <ctime>
using namespace std;
void shuffle(char [][4]);
void cls();
void sleepcp(int milliseconds);
@Ademking
Ademking / code.js
Created December 24, 2018 16:46
Vanilla JS : replace special chars like "é è à ù"
// replace special chars like é è à ù ...
function replace_special_char(text){
return text.toLowerCase().replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a").replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e").replace(/ì|í|ị|ỉ|ĩ/g, "i").replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o").replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u").replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y").replace(/đ/g, "d");
}
@Ademking
Ademking / README.md
Last active December 25, 2018 18:47
[FIX] Cmder : Cmder Here not working

This will fix Cmder Here For - For Windows

Steps:

  1. Open Cmdr -> WIN + ALT + P

  2. Create new Predefined task (Click on + button)

• Name: bash

@Ademking
Ademking / code.js
Last active January 19, 2019 06:04
JS : Listen to all events in page
// run in Dev console
// To catch specific events: /^on(key|mouse)/.test(key)
Object.keys(window).forEach(key => {
if (/^on/.test(key)) {
window.addEventListener(key.slice(2), event => {
console.log(event);
});
}
@Ademking
Ademking / README.md
Created January 23, 2019 10:35
How to restore deleted file(s) after git push -f
@Ademking
Ademking / README.md
Created February 3, 2019 13:17
Angular - How to change CSS project to SCSS
  1. run

ng config schematics.@schematics/angular:component.styleext scss

  1. in angular.json, change from (at two places)

"src/styles.css"

to