Skip to content

Instantly share code, notes, and snippets.

View najathi's full-sized avatar
💻
Developing

Najathi najathi

💻
Developing
View GitHub Profile
@najathi
najathi / gist:cf3138a661c3578a1444ee896b64d53d
Created December 11, 2023 18:02
Turn on the Scroll lock key in keyboard
sudo xmodmap -e 'add mod3 = Scroll_Lock'
@najathi
najathi / OrderController.php
Last active August 3, 2023 09:05
Recyle Order - Bank Validation API
<?php
// validate
public function bank_check($short, $account)
{
$bank_v_access_key = env('BANK_ACCOUNT_CHECK_KEY');
$bank_v_password = env('BANK_ACCOUNT_CHECK_PASSWORD');
$sort_code = $short;
$account_number = $account;
@najathi
najathi / typescriptreact.json
Last active April 30, 2023 06:07
Typescript React Function Component
// file->prefrences -> Configure User Snippets -> SEARCH (typescriptreact.json) -> Add the below code
"Typescript React Function Component": {
"prefix": "rh",
"body": [
"import React from 'react'",
"",
"interface ${TM_FILENAME_BASE}Props {",
"$1",
"}",
@najathi
najathi / google.php
Last active March 24, 2023 04:12
Laravel Google Config
<?php
return [
/*
|----------------------------------------------------------------------------
| Google application name
|----------------------------------------------------------------------------
*/
'application_name' => env('GOOGLE_APPLICATION_NAME', ''),
@najathi
najathi / JS_NamePlate.html
Created March 15, 2023 15:56
Brother Printer BPAC Javascript SDK
<!--
'*************************************************************************
'
' b-PAC 3.2 Component Sample for Extensions (JS_NamePlate.html)
'
' (C)Copyright Brother Industries, Ltd. 2019
'
'*************************************************************************/
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@najathi
najathi / install.txt
Last active September 15, 2022 07:49
Redis Configuration
Follow this instractions
1. Install usig WSL (This step only for windows machine)
Windows Subsystem Linux: https://docs.microsoft.com/en-us/windows/wsl/install
2. check distribution
uname
3. install redis
sudo apt-get update
@najathi
najathi / DateRangeFilter.js
Last active August 16, 2022 02:41
moment js date range filter using antd
import React from "react";
import { DatePicker, Button } from "antd";
import styles from "./DateRangeFilter.module.scss";
class DateRangeFilter extends React.PureComponent {
handleChange = (value) => {
if (!value) return;
@najathi
najathi / StringToLongConverter.cs
Created August 3, 2022 08:57
C# JSON Serialize changes String to Number type
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
public class StringToLongConverter : JsonConverter
{
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
JToken jt = JValue.ReadFrom(reader);
return jt.Value<string>();
@najathi
najathi / SecurePassword.cs
Created July 12, 2022 04:20
Encrypt and Decrypt the password in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.IO;
namespace Your_Namespace
{
@najathi
najathi / steps
Last active June 1, 2022 05:25
Create Virtual Host very quickly in Windows OS..
1. Open run (Win + R) and enter this location => D:\xampp\apache\conf\extra
2. Open this file with Any Editor (VS Code recommeded) => httpd-vhosts.conf
3. Add this line and save the file
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/demo-app/demo-api/public"
ServerName demo-api.test
</VirtualHost>
4. Open run (Win + R) and enter this location => C:\Windows\System32\drivers\etc\hosts