Skip to content

Instantly share code, notes, and snippets.

@Intey
Intey / road-to-web.markdown
Last active July 5, 2016 11:21
По просьбам, инфа за то, как прийти в веб, что читать и т.п.

Направления, ключи

JS, HTML, CSS - стандарт. Даже если идти в backend-разрабы - всеравно нужно.

Frontend - разработка морды. Дизайнер задает общий вид, рисует макеты, а фронтовик превращает это в рабочее приложение.

Backend - рабочая часть приложения. Мозги, тут бизнес-логика везде. Заодно и БД и API.

Обучалки

@Intey
Intey / Ls.sh
Created October 1, 2015 08:12
helpful shell command pipe
# dirs that childs of some_dir and their childs.
find some_dir -mindepth 1 -maxdepth 2 -type d
# though pipe, send it to ls to display permissions, without read content of given dirs
xargs ls -ldF
#!/bin/python3
import sys
import os
packs=[]
deps=[]
packs = sys.argv[1:]
if not packs:
# display type;path of removable devices(usb, cdrom etc.).
awk '{ if ($3 == 1) { print $2";"$1 }}' <(lsblk -p —output=NAME,TYPE,RM)
@Intey
Intey / CIFF.py
Last active August 29, 2015 14:22
crossplatform Include filenames fixer for C++ projects.
""" Replace UPPERCASE chars in filenames to lowercase,
and (in future) fix include directives respectively to new filenames. It's
needed for cross-platform compilation C++ code: on Windows, you can not doubt
about headers name. But, when you try to build it on *nix system case does
matter.
Usage:
renamer.py DIRECTORY [--dry-run]
renamer.py (-h | --help)
Options:
(define (guide-middle-box image drawable bwidth bheight)
(let* (
(width (car (gimp-image-width image)))
(height (car (gimp-image-height image)))
(vmargin (/ (- width bwidth) 2))
(hmargin (/ (- height bheight) 2)))
(if (and
(<= bwidth width)
(<= bheight height))
(begin
@Intey
Intey / gist:b4cbeb2971a1586a55f8
Created July 3, 2014 14:07
delete pattern from each file in current directory(recursively).
@echo off
Setlocal enabledelayedexpansion
echo %filePath%
Set "pattern=.paycrypt@gmail_com"
Set "replace="
echo "replace" %replace%
echo "Pattern " %pattern%
for /f "usebackq tokens=* delims=" %%# in (`dir /b /S /A:-D`) Do (
Set "File=%%~nx#"