Skip to content

Instantly share code, notes, and snippets.

View mezgoodle's full-sized avatar
🏠
Working from home

Maksym Zavalniuk mezgoodle

🏠
Working from home
View GitHub Profile
@tylerhall
tylerhall / strong-passwords.php
Created August 12, 2010 21:38
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active June 25, 2024 22:04
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

package main
import (
"fmt"
"net/http"
"sync"
)
func main() {
// A slice of sample websites
const TelegramBot = require('node-telegram-bot-api');
const axios = require('axios');
// Telegram's token
const token = 'your_telegrams_token';
//OpenWeatherMap API key
const appID = 'your_openweathermap_api_key';
// OpenWeatherMap endpoint for getting weather by city name
@iximiuz
iximiuz / serv_async.py
Last active February 13, 2024 11:00
Python Web Servers
# python3
import asyncio
import sys
counter = 0
async def run_server(host, port):
server = await asyncio.start_server(serve_client, host, port)
await server.serve_forever()
@Birdi7
Birdi7 / callback_data_factory_simple.py
Last active May 26, 2024 19:12
A simple example of usage of callback data factory from aiogram
"""
This is a simple example of usage of CallbackData factory
For more comprehensive example see callback_data_factory.py
"""
import asyncio
import logging
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.fsm_storage.memory import MemoryStorage
@bradtraversy
bradtraversy / django_crash_course.MD
Last active March 1, 2024 02:44
Commands for Django 2.x Crash Course

Django Crash Course Commands

# Install pipenv
pip install pipenv
# Create Venv
pipenv shell