Skip to content

Instantly share code, notes, and snippets.

View tamtamchik's full-sized avatar
🃏

Yuri Tkachenko tamtamchik

🃏
View GitHub Profile
@tamtamchik
tamtamchik / fetch-https.js
Created October 4, 2021 19:33
fetch-https.js
import https from 'node:https'
import fetch from 'node-fetch'
const agent = new https.Agent({ keepAlive: true })
const toMb = x => `${(x / 1024 / 1024).toFixed(2)} Mb`
async function start () {
const s = process.memoryUsage()
@tamtamchik
tamtamchik / triggers.md
Last active June 8, 2020 07:45
Список напоминаний о незавершенных делах

Личные

  • Проекты начатые, но незавершенные проекты

  • Проекты, которые нужно начать реализовывать

  • Проекты – другие организации

    Обслуживание, сообщество, добровольческая деятельность, духовные организации

  • Обязательства/обещания другим людям

@tamtamchik
tamtamchik / remove_remote_merged
Last active December 22, 2015 14:23
remove_remote_merged
#!/bin/bash
git fetch --all --prune && git branch -r --merged | grep -v master | sed 's/origin\//:/' | xargs -n 1 git push origin
@tamtamchik
tamtamchik / compile_csv_search.js
Last active September 7, 2015 13:46
compile_csv_search - my implementation, at least I didn't find such solution anywhere...
// For those who search
var compile_csv_search = function(string, column) {
var lines = string.split('\n').map(function(l){ return l.split(','); }), hash = {};
for (var i = 1, j = lines.length - 1; i <= j; i++) {
var result = {}; for(var j = 0; j < lines[0].length; j++) { result[lines[0][j]] = lines[i][j]; }
hash[lines[i][lines[0].indexOf(column)]] = result;
};
return function(name) { return hash[name]; }
@tamtamchik
tamtamchik / tech-sheet.md
Last active June 21, 2019 19:33
IT Tech-sheet

IT Tech-sheet

  1. Google
  2. HTTP / HTTPS
  3. MVC / MVVM
  4. LAMP
  5. AJAX
  6. Comet / WebSockets / Pooling
  7. git / Mercurial / SVN
  8. BASH
@tamtamchik
tamtamchik / fetcher.sh
Created June 4, 2012 17:25
Fetch all branches & tags from remote git repository.
#!/bin/bash
for branch in `git branch -r | grep -v HEAD | grep -v master`; do
echo ${branch##*/} $branch
done
echo "Fetching..."
git fetch --all
echo "Pulling..."
git pull -v
echo "Results: Branches"
git branch -a