Skip to content

Instantly share code, notes, and snippets.

View sapegin's full-sized avatar
🌄
Disconnected

Artem Sapegin sapegin

🌄
Disconnected
View GitHub Profile
@sapegin
sapegin / index.js
Last active January 15, 2016 08:25
Detect minified files in Webpack
/*
module: {
loaders: [
{
test: /\.jsx?$/,
loaders: ['detect-min']
},
]
}
*/
@sapegin
sapegin / config.js
Created February 13, 2015 10:38
Mocha + Require.js + Atomus (jsdom wrapper)
// Author: Artem Sapegin http://sapegin.me, 2015
(function() {
var config = {
paths: {
lodash: '../bower_components/lodash/lodash',
jquery: '../bower_components/jquery/dist/jquery',
backbone: '../bower_components/backbone/backbone',
react: '../bower_components/react/react',
backboneLocalStorage: '../bower_components/backbone.localStorage/backbone.localStorage',

Programming languages I’ve ever worked with

  • ActionScript
  • AppleScript
  • Assembly language: MASM for DOS and Windows
  • Bash
  • BASIC: ZX Spectrum’s, QuckBasic
  • Batch: DOS, Windows
  • C
  • C++: VisualC++
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var stylus = require('gulp-stylus');
var autoprefixer = require('gulp-autoprefixer');
gulp.task('styles', function() {
return gulp.src('styles/task*.styl')
.pipe(stylus())
.pipe(autoprefixer('last 2 versions', 'ie 9', 'android 2.3'))
.pipe(gulp.dest('build/'));
@sapegin
sapegin / table.md
Last active December 28, 2015 07:29 — forked from jkschoen/table.md

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

@sapegin
sapegin / Gruntfile.coffee
Last active January 29, 2016 13:35
How to use Autoprefixer plugin for Stylus with grunt-contrib-stylus
grunt.initConfig
stylus:
options:
use: [
() -> require('autoprefixer-stylus')('last 2 versions', 'ie 8')
]
compile:
files:
'build/styles.css': 'styles/index.styl'
@sapegin
sapegin / cmnts.php
Created October 1, 2013 19:18
Aegea to Docpad migration scripts
<?php
// Aegea to Disqus comments converter
// http://help.disqus.com/customer/portal/articles/472150
$url_prefix = 'http://nano.sapegin.ru/all/';
$note_id = intval($_GET['id']);
if (empty($note_id)) exit('Empty note ID.');
<div class="book-reviews">
<% for book in @books: %>
<div class="book-review">
<img src="/images/books/<%= book.id %>.jpg" alt="<%= book.author %>. <%= book.title %>" class="book-review__img">
<h2 class="book-review__title">
<%= book.author %> «<a href="<%= @buyLink book.link %>" class="link"><%= book.title %></a>»
(<span class="book-review__year"><%= book.year %></span>)
</h2>
<div class="book-review__text">
<%= book.text %>
# Force the latest IE version
# Use ChromeFrame if it's installed for a better experience for the poor IE folk
add_header "X-UA-Compatible" "IE=Edge,chrome=1";
# Static files
location ~* \.(?:png|jpg|jpeg|gif|ico|svg|svgz|swf|woff|eot|otf|ttf|ttc|mp3|mp4|ogg|ogv|webm)$ {
expires 1M;
access_log off;
log_not_found off;
add_header Cache-Control "public";
@sapegin
sapegin / gist:5656372
Last active December 17, 2015 18:49
Продаю в Москве

Цифровой фотоальбом Epson P-2000

Жуёт карточки CF и SD, диск на 20 ГБ, экран 3,8".

1500 ₷

Пишите или звоните