Skip to content

Instantly share code, notes, and snippets.

@furdarius
furdarius / Default (Linux).sublime-keymap
Last active March 10, 2016 18:28
Sidebar sublime3-theme
[
{
"keys": ["alt+1"],
"command": "toggle_side_bar"
}
]
@furdarius
furdarius / main.cpp
Created January 12, 2016 19:20
split string C++
vector< string > split(string str)
{
std::vector<std::string> v ; //Use vector to add the words
std::size_t prev_pos = 0, pos;
while ((pos = str.find_first_of(",;", prev_pos)) != std::string::npos)
{
v.push_back(str.substr(prev_pos, pos-prev_pos));
prev_pos = pos + 1;
}
@furdarius
furdarius / backend.env.js
Last active November 29, 2015 16:52
Browserify Angular application gulpfile for Laravel5.1 (Elixir)
module.exports = {
assetsPath: 'resources/backend/assets',
publicPath: 'public/backend',
angularPath: 'resources/backend/angular/'
};
@furdarius
furdarius / main.cpp
Last active November 10, 2015 13:46
Кол-во компонентов графа
vector<char> used;
vector< vector<int> > g;
void dfs(int start)
{
used[start] = true;
for (int i = 0; i < g[start].size(); ++i) {
if (!used[g[start][i]]) {
dfs(g[start][i]);
}
@furdarius
furdarius / main.cpp
Created November 10, 2015 10:08
Генерация перестановок
#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
using namespace std;
fstream fout;
void printA(const vector<short int> &arr) {
@furdarius
furdarius / gulpfile.js
Created August 29, 2015 19:07
Gulpfile.js with sass, js, maps, config, prod task, sourcemaps
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var sassdoc = require('sassdoc');
var minifycss = require('gulp-minify-css');
@furdarius
furdarius / how_to_homestead.txt
Created August 18, 2015 15:56
Сказ о том как я Vagrant, Homestead, Cygwin и Rsync ставил.
Устанавливаем Vagrant https://www.vagrantup.com
Устанавливаем ConEmu https://github.com/Maximus5/ConEmu
Устанавливаем Homestead http://laravel.com/docs/5.1/homestead
bash init.sh — Переносит настройки Homestead в %homepath%/.homestead
Теперь настройки Homestead будут глобальные
Мои настройки:
folders:
- map: ~/web-projects/homestead
to: /home/vagrant/projects
type: rsync