Skip to content

Instantly share code, notes, and snippets.

View MirzaLeka's full-sized avatar
:octocat:

Mirza Leka MirzaLeka

:octocat:
View GitHub Profile
@Ggariv
Ggariv / README.md
Last active January 29, 2023 20:54
Regex - Tutorial

17 Computer Science for JavaScript: Regex Tutorial

Developers write code, but they also write about code. Take a moment to search the web for tutorials about any of the subjects you’ve learned so far in this course. You’re likely to find thousands of tutorials written by developers of all skill levels, but especially by junior developers—like you!

Your Challenge this week is to create a tutorial that explains how a specific regular expression, or regex, functions by breaking down each part of the expression and describing what it does.

Before you start, clone the starter code.

User Story

@nunesson
nunesson / gist:c7bd3e2438abea7f0777897d6350f2b3
Created January 29, 2023 20:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Hadryan
Hadryan / README.md
Created January 29, 2023 19:55 — forked from woblerr/README.md
Docker containers logs clearing script

Docker containers logs clearing script

chmod +x ./clear_docker_container_logs.sh

Usage

Usage: ../clear_docker_container_logs.sh [-c ""]
@Deiontre10
Deiontre10 / regex-breakdown.md
Last active January 30, 2023 00:50
A regex used to match a URL

Regex E for Everyone

Regex or Regular Expressions are powerful patterns used to match, search, and manipulate text. Yet they are hard to master which is why I am creating a breakdown, that everyone can understand. They are widely used in various programming languages and tools for tasks such as data validation, pattern matching, and text processing.

Summary

The regex /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w\s\.-]*)*\/?$/ is a pattern that matches a URL. It consists of various components such as anchors, quantifiers, grouping constructs, bracket expressions, character classes, the OR operator, flags, and character escapes. This guide will provide a comprehensive explanation of each component used in the regex pattern.

Table of Contents

Homework 3

Joseph Vanacore

Link to Codepen

Video 1

What made the idea viable?

  • Since the highlighting issue has an open source code file that can ne inspected and fixed, makes the overall idea viable.

What is the original issue with the Lit code highlighter?

  • The lines being presented at the start of the video are not being highlighted properly which is causing other lines to be highlighted without being commanded to. Instead of the lines being properly highlighted, the lines are getting boxed in which makes the code appear to be highlighted. Changing the width of the box wil change the size of what is being highlighted.

What’s a strategy you can engage in in order to refactor toward better code? What strategy / how many iterations did I go through to get “better code”? - What makes this code better?

@acodesmith
acodesmith / angular-material-input-height.scss
Created October 1, 2021 12:48
Angular Material Input Set Height
.mat-form-field {
font-size: 0.74rem;
input {
font-size: 1rem;
}
label.mat-form-field-label {
font-size: 1rem;
top: 1.45em;
@farhad-taran
farhad-taran / README.md
Last active January 7, 2024 13:27
How to run a Javascript function at a specific time of day

some scenarios require us to run a piece of code at a specific time of day, the following method allows us to do this:

function runAtSpecificTimeOfDay(hour, minutes, func)
{
  const twentyFourHours = 86400000;
  const now = new Date();
  let eta_ms = new Date(now.getFullYear(), now.getMonth(), now.getDate(), hour, minutes, 0, 0).getTime() - now;
  if (eta_ms < 0)
 {
Visual Studio 2017
Test Professional:
VG622-NKFP4-GTWPH-XB2JJ-JFHVF
Professional:
KBJFW-NXHK6-W4WJM-CRMQB-G3CDH
4F3PR-NFKDB-8HFP7-9WXGY-K77T7
Enterprise:
NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
@sohamkamani
sohamkamani / rsa.js
Last active May 8, 2024 19:32
An example of RSA Encryption implemented in Node.js
const crypto = require("crypto")
// The `generateKeyPairSync` method accepts two arguments:
// 1. The type ok keys we want, which in this case is "rsa"
// 2. An object with the properties of the key
const { publicKey, privateKey } = crypto.generateKeyPairSync("rsa", {
// The standard secure default length for RSA keys is 2048 bits
modulusLength: 2048,
})