Skip to content

Instantly share code, notes, and snippets.

View zoxon's full-sized avatar

Zoxon zoxon

View GitHub Profile
@zoxon
zoxon / photoshop-hot-keys.md
Last active March 24, 2017 09:49
Часто используемые горячие клавиши для Photoshop

Часто используемые горячие клавиши для Photoshop

Разное

  • Ctrl + TAB – переключение вкладок;
  • Alt + колесико – увеличение/уменьшение масштаба (инструмент «Масштаб»);
  • Зажатый пробел – перетаскивание (инструмент «Рука»);
  • Ctrl + S – сохранить;
  • Ctrl + Z – отмена;
  • Ctrl + Alt + Z – шаг назад (многократный);
  • Ctrl + Shift + Z – шаг вперед (многократный);

Moving to a new branch

Unless there are other circumstances involved, this can be easily done by branching and rolling back.

git branch newbranch
git reset --hard HEAD~3 # Go back 3 commits. You *will* lose uncommitted work.*1
git checkout newbranch

Delete Git branch both locally and remotely?

git push origin --delete <branch_name>
git branch -d <branch_name>
@jtulk
jtulk / index.js
Created December 29, 2016 17:56
A more efficient reducer for adding/editing/removing objects in an array using a hash table
const initialState = {
byId: ['1', '2', '3'],
byHash: {
'1': {id: '1', content: {title: 'item 1'}},
'2': {id: '2', content: {title: 'item 2'}},
'3': {id: '3', content: {title: 'item 3'}}
}
}
const action1 = {
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const { createBundleRenderer } = require('vue-server-renderer');
const clientConfig = require('./build/webpack.client.config');
const serverConfig = require('./build/webpack.server.config');
const clientCompiler = webpack(clientConfig);
const serverCompiler = webpack(serverConfig);
const app = require('express')();
@magicznyleszek
magicznyleszek / git.md
Last active June 10, 2021 06:40
Git Cheatsheet

Сравнение синтаксиса

Для сравнения была поставлена задача преобразовать входные данные вида:

var data = {
  caption: "Cap",
  people: [ 'John', 'Malkovich', 'Doe' ]
}

в строку Cap: John, Malkovich, Doe

@magicznyleszek
magicznyleszek / javascript-vs-jquery.md
Last active November 30, 2021 17:50
Vanilla JavaScript

Vanilla JavaScript

Some vanilla equivalents to jQuery methods.

DOM selectors

jQuery:

@shaneriley
shaneriley / mixins.jade
Created February 10, 2014 20:10
Jade mixins example
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
@letorbi
letorbi / fontsmoothie.js
Last active January 15, 2022 17:39
This code enforces font-smothing for web fonts even if it's not enabled in the system settings. More info: http://pixelsvsbytes.com/blog/2013/02/nice-web-fonts-for-every-browser
// Font Smoothie copyright 2013,14,15 Torben Haase <http://pixelsvsbytes.com>
// Source-URL <https://gist.github.com/letorbi/5177771>
//
// Font Smoothie is free software: you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option) any
// later version.
//
// Font Smoothie is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS