Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dmmeteo
dmmeteo / 1.srp.py
Last active April 23, 2024 15:09
SOLID Principles explained in Python with examples.
"""
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
"""
class Animal:
def __init__(self, name: str):
@guessi
guessi / email_validator_regex.sh
Last active April 23, 2024 15:08
Simple Email Validator in Bash
#!/usr/bin/env bash
#
# RFC standard of the email address could be found in rfc5322, rfc6854, etc.
#
# however, it is hard to escape all the special characters in the bash
# so, in this script, it will only check for the address syntax only
# having some valid/invalid inputs to test its result
#
# please be noted that, it is not design to detect mailbox deliverability
This file has been truncated, but you can view the full file.
#EXTM3U
#EXTINF:-1 ,Channel T1
http://128.199.212.160/channelt1/1080/index.m3u8
#EXTINF:-1 ,Channel-S
https://a.jsrdn.com/r-373576a3/publish/22679_24MrQma9TX/index.m3u8
#EXTINF:-1 ,NTV (UK Time)
https://a.jsrdn.com/r-373576a1/publish/22680_3BR3zocwi9/index.m3u8
#EXTINF:-1 ,NTV (US Pacific Time)
https://a.jsrdn.com/broadcast/22680_3BR3zocwi9/-0800/c.m3u8
Rem run as administrator
@echo on & @setlocal enableextensions
@echo =========================
@echo Turn off the time service
net stop w32time
@echo ======================================================================
@echo Set the SNTP (Simple Network Time Protocol) source for the time server
w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org"
@echo =============================================
@echo ... and then turn on the time service back on
@Atavic
Atavic / properties_system_android.md
Created January 29, 2018 22:10
Android System Properties
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 23, 2024 15:03
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@beleidy
beleidy / history.zsh
Created October 4, 2019 19:32
Zsh history settings -- taken from oh-my-zsh
## History wrapper
function omz_history {
local clear list
zparseopts -E c=clear l=list
if [[ -n "$clear" ]]; then
# if -c provided, clobber the history file
echo -n >| "$HISTFILE"
echo >&2 History file deleted. Reload the session to see its effects.
elif [[ -n "$list" ]]; then
@0xjac
0xjac / private_fork.md
Last active April 23, 2024 14:56
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@m4ll0k
m4ll0k / gist:11f40f41fac6277dd5a7c57367094873
Created February 11, 2021 19:34
List of real addresses
777 Brockton Avenue, Abington MA 2351
30 Memorial Drive, Avon MA 2322
250 Hartford Avenue, Bellingham MA 2019
700 Oak Street, Brockton MA 2301
66-4 Parkhurst Rd, Chelmsford MA 1824
591 Memorial Dr, Chicopee MA 1020
55 Brooksby Village Way, Danvers MA 1923
137 Teaticket Hwy, East Falmouth MA 2536
42 Fairhaven Commons Way, Fairhaven MA 2719
374 William S Canning Blvd, Fall River MA 2721