Skip to content

Instantly share code, notes, and snippets.

@pasha-pivo
pasha-pivo / tree.cpp
Last active October 24, 2018 16:53
binary tree example
#include <iostream>
using namespace std;
/*
* класс ноды дерева
*/
template <class T>
struct bool_node {
bool_node<T>* less;
bool_node<T>* more;
@pasha-pivo
pasha-pivo / convert.sh
Last active April 26, 2018 07:25 — forked from akost/convert.sh
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.txt" -o -name "*.html" -type f |
while read file
do
echo " $file"
mv "$file" "$file".icv
@pasha-pivo
pasha-pivo / index.js
Created April 7, 2017 08:26
test gist
const connect = require('connect')
const app = connect()
app.use('/', (req, res, next) => {
res.end('You did it, bro!')
})
app.listen(8989)