Skip to content

Instantly share code, notes, and snippets.

# Шпаргалка по консольным командам Git
## Общее
Git — система контроля версий (файлов). Что-то вроде возможности сохраняться в компьютерных играх (в Git эквивалент игрового сохранения — коммит).
Любой файл в папке существующего репозитория может находиться или не находиться под версионным контролем (отслеживаемые и неотслеживаемые).
Неотслеживаемые файлы можно в любой момент сделать отслеживаемыми и наоборот.
<?php
$action = $_GET['action'];
if($action == "login"){
ob_start();
session_start();
$username = $_POST['email'];
$password = $_POST['password'];
$sql_check = mysql_query("select * from users where mail='".$username."' and password='".$password."' ") or die(mysql_error());
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active September 23, 2025 21:29
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active September 23, 2025 21:21
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@mikaelhg
mikaelhg / cuda-install.md
Last active September 23, 2025 21:05
Proper CUDA and cuDNN installation
date title tags
2020-02-29
Proper CUDA and cuDNN installation
tech

You're here, so you're probably already hurting because of CUDA and cuDNN compatibility, and I won't have to motivate you, or explain why you'd want to have standalone CUDA and cuDNN installations, if you're going to develop using Tensorflow in the long term.

1. Download your CUDA runfile (local) packages

@pansapiens
pansapiens / Dockerfile
Last active September 23, 2025 21:01
bcl-convert in Docker / Singularity
FROM centos:7
#
# You'll need to download bcl-convert-3.6.3-1.el7.x86_64.rpm from
# https://support.illumina.com/downloads/bcl-convert-downloads.html
# Yay clickwrap licenses !
#
# Building:
#
# docker build -t bcl-convert:latest -t bcl-convert:3.6.3 .
# sudo singularity build bcl-convert.sif docker-daemon://bcl-convert:latest
@chrisdone-artificial
chrisdone-artificial / laws.md
Last active September 23, 2025 20:17
laws

Law's that apply to our industry (and others) are interesting to me, and I'm writing up here the ones that often come to mind. I usually forget the name, so writing them up might be helpful for remembering in future.

Parkinson's law

C. Northcote Parkinson's law: Work expands so as to fill the time available for its completion. Similarly, in computing, data expands to fill the space available for storage,

@karpathy
karpathy / min-char-rnn.py
Last active September 23, 2025 19:54
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@WellDone2094
WellDone2094 / ThemeProvider.tsx
Last active September 23, 2025 19:39
Tan Stack Start Theme provider
'use client';
/*
This file is adapted from next-themes to work with tanstack start.
next-themes can be found at https://github.com/pacocoursey/next-themes under the MIT license.
*/
import * as React from 'react';
interface ValueObject {
@jboner
jboner / latency.txt
Last active September 23, 2025 19:28
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD