Skip to content

Instantly share code, notes, and snippets.

View smhemel's full-sized avatar
😊
Happy

S M HEMEL smhemel

😊
Happy
  • Enosis Solutions
  • Dhaka, Bangladesh.
  • 09:49 (UTC +06:00)
View GitHub Profile
@smhemel
smhemel / create-programmatically-modal.md
Created October 31, 2023 19:39
Create an Alert Modal programmatically

auth.component.html

<ng-template appPlaceholder></ng-template>

auth.component.ts

import {
  Component,
  ComponentFactoryResolver,
@smhemel
smhemel / create-manual-alert.md
Created October 31, 2023 12:36
Create an alert component and make it functional.

alert.compnent.html

<div class="backdrop" (click)="onClose()"></div>
<div class="alert-box">
  <p>{{ message }}</p>
  <div class="alert-box-actions">
    <button class="btn btn-primary" (click)="onClose()">Close</button>
  </div>
</div>
@smhemel
smhemel / git.md
Last active August 21, 2023 11:16

Git Documentation

Configure Git(Set Username and Email)

  • First, install git into you machine.
  • Set Username - git config --global user.name "Sm Hemel"
  • Set Email - git config --global user.email [email protected]

Some common command-line command

  • Show file list with hidden file - ls -a
  • Create file - touch test.txt
@smhemel
smhemel / arrayBufferToString.js
Created April 27, 2023 17:33 — forked from skratchdot/arrayBufferToString.js
Array Buffer -> String and String -> ArrayBuffer conversions in javascript
// source: http://stackoverflow.com/a/11058858
function ab2str(buf) {
return String.fromCharCode.apply(null, new Uint16Array(buf));
}

deb software installer

sudo install

NodeJS install

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root', // your root username (leave as root)
database : 'join_us', // the name of your db (create this if you haven't already)
password : process.env.MYSQL_PW // your root user's password
});
//If you want to impor password then
@smhemel
smhemel / Sql Query
Created April 10, 2020 21:02
This note is help for manage your database.
//Start MySql in terminal
mysql-ctl cli
//Create Database
CREATE DATABASE test_db;
//List available databases
show databases;
//Delete Or Drop a database
// This file add your project and customize your Label.
import UIKit
@IBDesignable
class UILabelX: UILabel {
@IBInspectable var cornerRadius: CGFloat = 0 {
didSet {
self.layer.cornerRadius = cornerRadius