Skip to content

Instantly share code, notes, and snippets.

View sibsfinx's full-sized avatar
😸

Alexander Mescheryakov sibsfinx

😸
View GitHub Profile
@sibsfinx
sibsfinx / keybindings.json
Created December 20, 2024 09:06
VS Code shortcut: open terminal in Editor area
// macOS: Cmd + Shift + P -> Preferences: Open Keyboard Shortcuts (JSON)
// Windows: Ctrl + Shift + P -> Preferences: Open Keyboard Shortcuts (JSON)
[
{
"key": "ctrl+`",
"command": "workbench.action.createTerminalEditor",
"when": "!terminalFocus"
},
{
@sibsfinx
sibsfinx / ComponentWithState.tsx
Created November 11, 2024 15:57
React TSX component with state
import React from 'react';
const UiState = {
loading: 'loading',
ready: 'ready'
} as const;
type UiState = typeof UiState[keyof typeof UiState];
const stateList: Record<UiState, React.ReactNode> = {

Инструмент для разработки емэйл–шаблонов (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"
}