Skip to content

Instantly share code, notes, and snippets.

View shalithadev's full-sized avatar
🎯
Focusing

Hashan Shalitha shalithadev

🎯
Focusing
View GitHub Profile
@XronTrix10
XronTrix10 / ESLINT_PRETTIER_NEXTJS_V14.md
Last active December 18, 2024 18:43
Set up ESlint and Prettier for Next.js with Typescript and TailwindCSS

Set up ESlint and Prettier for Next.js 14 with Typescript and TailwindCSS

Create Next App with starter template ( Last Version of Next 14 )

npx [email protected] --ts --tailwind --app --src-dir --use-yarn --eslint

Install Dev Dependencies

{%comment%}
##################################################
# How To add Coupon Code — Discount Field #
# On Shopify Cart Before Checkout #
# Without Apps #
#################################################
# Paypal Me: https://paypal.me/elghorfimed #
# Buy Me A Coffee: #
# https://www.buymeacoffee.com/elghorfi #
############################################# #
// Sri Lankan Modern Licence Number Plate Regex //
FORMAT : PP LLL DDDD
PP - Province (SP, NW, WP, UP, CP, NC, SG, EP, NP)
LLL - 3 Letter
DDDD - 4 Digits
Regex : ^(SP|NW|WP|UP|CP|NC|SG|EP|NP{1,2})\s([A-Z]{1,3})\s([0-9]{4}(?<!0{4}))$
hist = model.fit([Xtrain.book_id, Xtrain.user_id], Xtrain.rating,
batch_size=64,
epochs=5,
verbose=1,
validation_data=([Xtest.book_id, Xtest.user_id], Xtest.rating))
@197291
197291 / ProtectedRoute.jsx
Created July 1, 2019 20:26
Auth HOC, React.js
// Test every passed-in auth verification function.
const verifyAuth = (authCriteria, props) => {
if (authCriteria.length === 0) return true;
return authCriteria.every(criterion => criterion(props));
};
// Authentication HoC
const withAuth = ({
authCriteria = [],
redirectPath = '/',
#EXTM3U
## MUSIC
#EXTINF:-1,95bFM Auckland, New Zealand
https://ssl.geckohost.nz/proxy/caitlinssl?mp=/stream
#EXTINF:-1,KCRW 89.9FM Music Stream Santa Monica, CA
http://kcrw.streamguys1.com/kcrw_192k_mp3_e24_internet_radio
#EXTINF:-1,KEXP 90.3FM Seattle, Washington
https://kexp-mp3-128.streamguys1.com/kexp128.mp3
@rutvikbhatt9
rutvikbhatt9 / .gitlab.ci.yml (react-native)
Created February 11, 2019 05:53
.gitlab.ci.yml file for React-Native
image: openjdk:8-jdk #Defining the Docker Image
variables:
ANDROID_COMPILE_SDK: "28" #set compile SDK version
ANDROID_BUILD_TOOLS: "28.0.2" #set build tool version
ANDROID_SDK_TOOLS: "4333796" #set SDK tool build number you can find yous here https://developer.android.com/studio/releases/sdk-tools
before_script:
# Fetch the specified SDK tools version to build with
- wget --quiet --output-document=/tmp/sdk-tools-linux.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active March 30, 2025 15:37
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@kmuralidharan91
kmuralidharan91 / SearchResultsTableViewController.swift
Created July 25, 2018 06:11
UITableViewController with SearchBar
import UIKit
import SwiftyJSON
import Alamofire
import SafariServices
final class SearchResultsTableViewController: UITableViewController {
private var searchResults = [JSON]() {
didSet {
tableView.reloadData()
@kmuralidharan91
kmuralidharan91 / APIRequestFetcher.swift
Created July 25, 2018 06:00
APIRequestFetcher.swift
import Foundation
import SwiftyJSON
import Alamofire
enum NetworkError: Error {
case failure
case success
}
class APIRequestFetcher {