Skip to content

Instantly share code, notes, and snippets.

View sapegin's full-sized avatar
🌄
Disconnected

Artem Sapegin sapegin

🌄
Disconnected
View GitHub Profile
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/'));

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++
@sapegin
sapegin / jquery.selections.js
Created January 20, 2011 08:06
jQuery Selections ɑ
/**
@title: Selections
@version: 0.0.1
@author: Artem Sapegin
@author: Andreas Lagerkvist
@date: 2011-01-20
@license: http://creativecommons.org/licenses/by/3.0/
@copyright: 2010 Artem Sapegin (sapegin.ru)
@copyright: 2008 Andreas Lagerkvist (andreaslagerkvist.com)
@sapegin
sapegin / gist:811144
Created February 4, 2011 14:08
Windows Speaker
mshta "javascript:close((V=(v=new ActiveXObject('SAPI.SpVoice')).GetVoices()).count&&v.Speak('The quick brown fox jumps over the lazy dog.'))"
@sapegin
sapegin / gist:818396
Created February 9, 2011 12:36
Conditional rows formatting in Google Docs Spreadsheet
var styles = {
'default': {
color: '#000',
background: '#fff',
style: 'normal'
},
sent: {
color: '#ccc',
style: 'italic'
},
@sapegin
sapegin / gist:925002
Created April 18, 2011 08:37
CSS3 Buttons in Springhare
/* Button */
button, input[type="submit"] {
display: inline-block;
padding: 2px 20px;
background: #c4c4c4;
background: -webkit-linear-gradient(top, #eee, #c4c4c4);
background: -moz-linear-gradient(top, #eee, #c4c4c4);
background: -ms-linear-gradient(top, #eee, #c4c4c4);
background: -o-linear-gradient(top, #eee, #c4c4c4);
background: linear-gradient(top, #eee, #c4c4c4);
@sapegin
sapegin / formatnumber.js
Created June 7, 2011 13:27
JavaScript Cookbook
function formatNumber(value) {
value = value.toString()
.replace(".", ",")
.replace(" ", "")
.replace("-", "−");
var re = /(\d+)(\d{3})/;
while (re.test(value)) {
value = value.replace(re, "<i>$1</i>$2");
}
@sapegin
sapegin / FON.BAS
Created June 29, 2011 13:34
Part of our game Iron Man. QBasic, circa 1998
CLS : SCREEN 9
'### BOMBA ###################################################################
CLS : SCREEN 9
DATA 0,0,0,0,0,0,0,4,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,4,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,4,4,4,0,0,0,0,0,0
DATA 0,0,0,0,0,0,4,4,4,0,0,0,0,0,0
DATA 0,0,0,0,0,0,4,4,4,0,0,0,0,0,0
@sapegin
sapegin / birdwatcher.php
Created August 8, 2011 14:31
All categories page for Wordpress
<?php
// wp-content/plugins/birdwatcher/birdwatcher.php
/*
* Страница со списком категорий
*/
add_shortcode( 'all_tags', 'bw_all_tags' );
function bw_all_tags()
{
@sapegin
sapegin / main.js
Created December 6, 2011 11:36
Components initialization
(function() {
initComponents({
pony: function(container) {
}
});
})();