Skip to content

Instantly share code, notes, and snippets.

View IvanIsak2000's full-sized avatar
🎯
Focusing

Iwan Sakharov ⚙️ IvanIsak2000

🎯
Focusing
View GitHub Profile
@nicolasparada
nicolasparada / random_string.go
Last active January 28, 2025 17:19
Quick and easy way to generate a random string in golang
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().UnixNano())
@Voloshin-Sergei
Voloshin-Sergei / commit.md
Created November 3, 2020 13:10
Шпаргалка по оформлению коммитов

Требования к именам коммитов

  • Названия коммитов должны быть согласно гайдлайну
  • Должен использоваться present tense ("add feature" not "added feature")
  • Должен использоваться imperative mood ("move cursor to..." not "moves cursor to...")

Примеры имен коммитов

init: - используется для начала проекта/таска. Примеры:
  • init: start youtube-task
  • init: start mentor-dashboard task
@KernelA
KernelA / .dockerignore
Created February 1, 2020 20:31
.dockerignore example for Python projects
# Git
.git
.gitignore
.gitattributes
# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml
@miranda-zhang
miranda-zhang / linux.md
Last active March 30, 2025 12:34
Linux Command Cheat Sheet, Ubuntu, CentOS

Linux Command Cheatsheet

Linux Keyboard shortcuts

open terminal: Ctrl+Alt+T

Ctrl + C is used to kill a process with signal SIGINT , in other words it is a polite kill .

Ctrl + Z is used to suspend a process by sending it the signal SIGTSTP , which is like a sleep signal, that can be undone and the process can be resumed again.

@kalafut
kalafut / django_init
Last active March 1, 2025 13:22
Simple creation of a single-app django project
#!/bin/bash
#
# Simple creation of a single-app django project, as described in: https://zindilis.com/posts/django-anatomy-for-single-app/
#
# ./django_init foo
#
# This will result is the following flat structure:
#
# .
# └── foo
@RANUX
RANUX / комбинации-клавиш-bash.txt
Last active April 10, 2025 18:42
Комбинации клавиш для Bash
##### Перемещение курсора:
Ctrl + a — переход в начало строки
Ctrl + b — переход на 1 символ назад
Ctrl + c — посылает программе SIGINT. Обычно, прерывает текущее задание
Ctrl + d — удаляет символ под курсором (аналог delete)
Ctrl + e — переход к концу строки
Ctrl + f — переход на 1 символ вперёд
Ctrl + xx — переходит от текущей позиции курса в начало строки и обратно.
Ctrl + p — Предыдущая команда (Стрелка вверх)
@claymcleod
claymcleod / pycurses.py
Last active March 23, 2025 17:37
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@glesica
glesica / equality.py
Created March 11, 2015 19:53
Brief exploration of Python's magic methods for equality testing.
# Equality in Python
# When using custom types (classes) many programmers like to be able
# to use built-in concepts like "==" instead of something like
# "a.equals(b)". Generally it is only a good idea to do this if the
# concept you are implementing is conceptually the same as what the
# operator is normally used for. An example:
class Person1(object):
def __init__(self, name, age):
@mkropat
mkropat / knownpaths.py
Last active February 4, 2025 17:31
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)