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:6e2fef1c73567d866b47e642599d3c83
Last active July 6, 2024 19:22
Add Scroll lock key feature in ubuntu
1. Navigate to home directory
nano ~/enable_scroll_lock_with_key.sh
#!/bin/bash
on=$(xset -q | grep 'Scroll Lock:' | cut -d ":" -f 7)
echo $on
if [ $on == "off" ]; then
xset led named "Scroll Lock"
else
@najathi
najathi / gist:e94258fce5dfb710ebee112996b2a5ca
Last active July 6, 2024 19:23
Automatically enable the scroll lock in ubuntu
1. navigate to home directory
nano ~/enable_scroll_lock.sh
#!/bin/bash
xset led named "Scroll Lock"
Make the Script Executable:
chmod +x ~/enable_scroll_lock.sh
@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>();