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>
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')();
@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
@magicznyleszek
magicznyleszek / regex.md
Last active March 4, 2022 20:57
RegEx Cheatsheet
@magicznyleszek
magicznyleszek / hex-to-rgb.js
Last active August 22, 2022 11:42
Hex to RGB
function hexToRgb(hex) {
// Expand shorthand form ("#FFF") to full form ("#FFFFF")
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
return r + r + g + g + b + b;
});
// return hex values
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
@arayaryoma
arayaryoma / index.ts
Last active June 14, 2024 07:44
[TOO OLD, ARCHIVED] How to use nanoid with TypeScript
import nanoid from 'nanoid';
console.log(nanoid());
const express = require('express');
const htm = require('htm');
const vhtml = require('vhtml');
// create an html`` tag function for vhtml:
const html = htm.bind(vhtml);
const App = (props) => html`
<div class="app">
<h1>This is an app</h1>