Skip to content

Instantly share code, notes, and snippets.

View sibsfinx's full-sized avatar
😸

Alexander Mescheryakov sibsfinx

😸
View GitHub Profile

Инструмент для разработки емэйл–шаблонов (2016)

Инструмент для дизайна, вёрстки и тестовой отправки писем

gulp, coffescript, jade, stylus

https://github.com/sibsfinx/ankor-emails

@sibsfinx
sibsfinx / ankor-course.rb
Last active February 7, 2019 11:10
code example: ruby on rails
class Course < ActiveRecord::Base
include FriendlyId
include Bootsy::Container
validates :title, :publicated_at, presence: true
before_validation :set_publicated_at
has_and_belongs_to_many :cities
belongs_to :language
@sibsfinx
sibsfinx / webflow-node-readme.md
Last active January 31, 2019 12:07
code-example-node-tool
@sibsfinx
sibsfinx / _animations.sass
Last active January 31, 2019 12:21
code-example-sass
@keyframes star
0%
opacity: 0
50%
opacity: 1
100%
opacity: 0
@keyframes star-glow
0%
@sibsfinx
sibsfinx / prepare_hd.sh
Last active February 12, 2018 00:54
Prepare external drive on mac fucking OS
# list disks:
diskutil list
# use disk name from the listed isntead of disk3
# unmount your external drive:
diskutil unmountDisk force disk3
# format in HFS with the name you want:
diskutil partitionDisk disk3 GPT JHFS+ "Drive Name" 0g
@sibsfinx
sibsfinx / promiseReturnsValue.js
Last active June 1, 2017 14:39
Can't make promise return value
// need to execute a chain of promises (using then())
// and make/call a function that will return a value (not a promise object)
p = (fn) => {
return new Promise((resolve, reject) => {
setTimeout( () => {
resolve(fn.call());
}, 1000);
});
};
@sibsfinx
sibsfinx / README.md
Last active December 5, 2023 17:11
clone ubuntu server with rsync

This script is pulling files from username@hostname:/* to / on the current server. So you need to ssh to the target server and and run it. Tested when migrating between two DigitalOcean droplets a while ago.

@sibsfinx
sibsfinx / .bowerrc
Created February 15, 2016 08:51
bower deploy setup
{
"directory" : "vendor/assets/components",
"json" : "bower.json"
}
@sibsfinx
sibsfinx / s3.js
Created February 2, 2016 10:33
deploy to amazon s3 with gulp (es6)
'use strict';
import path from 'path';
import awspublish from 'gulp-awspublish';
import parallelize from 'concurrent-transform';
import keys from 'config/keys.js'
export default function(gulp, plugins, args, config) {
let dirs = config.directories;
let build = dirs.destination;
@sibsfinx
sibsfinx / photoswipe.js.coffee
Created November 20, 2015 14:45
Photoswipe example
window.Gallery ||= {}
((app) ->
$(document).ready ->
$pswpElement = $('.pswp')[0]
$pswpCollection = $('@pswp-collection')
$pswpCollection.each ->
collection = $(@)
$pswpLinks = collection.find('[role*="pswp-link"]')
$pswpLinks.on 'click', (e) ->