Skip to content

Instantly share code, notes, and snippets.

View neochief's full-sized avatar

Alexander Shvets neochief

View GitHub Profile
@neochief
neochief / guildelines.md
Last active April 7, 2022 12:26
Korean translation guidelines

Above all, make sure that programming terms and the pattern name itself are translated in a way that is common to Korean programmers. This is very crucial. I tried to use a friendly casual voice in the book, avoiding academic jargon and complexities. It would be nice if the translated variant retains the same spirit for easy reading and understanding.

1. Consistency

I would like to point this right of the bet: keep things consistent.

  • If you translated the pattern name as A, do not refer to it as to B.

  • If you translated a role in the structure section as X, don't refer to it as Y later in the text. 90% of these links are established between things defined in the Structure and sections that go after it: "Applicability" & "How to Implement".

@neochief
neochief / .zshrc
Last active September 2, 2019 10:52
Fast XDEBUG on/off switches
# Paste thing whole thing to your ~/.bashrc or ~/.zhrc
# Make sure all the variables on top point to correct
# destinations in your system. This all works under MacOS,
# bu should be easily adjusted for Ubuntu (you'll need to
# replace the PHP restart comands at the end).
#
# Quick reference:
#
# xon : enables xdebug, disables blackfire, disables opcache
# xoff : disables xdebug, enables blackfire, enables opcache
@neochief
neochief / pseudocode.js
Created November 21, 2016 17:42
CodeMirror pseudocode highlighter.
(function (mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function (CodeMirror) {
"use strict";
@neochief
neochief / localized-hello.js
Last active May 2, 2020 21:26
Localized salutations by country (for websites and emails)
/**
* Salutations in different languages transliterated to English.
*
* This can be used on websites or email campaigns which do not
* have full localization, but if their owner still wants to
* provide basic level of "locale-friendliness" to its users.
*
* The key of the list is ISO ALPHA-3 country code.
*
* Note that the list does not include English speaking countries
@neochief
neochief / start.sh
Last active January 28, 2016 17:12
OSX
#/bin/bash
# Install xcode command line tools.
xcode-select --install
sudo xcrun cc
# ZSH
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
@neochief
neochief / user_echo.js
Created April 14, 2015 19:39
User-echo: Work-around for multiple widgets on one page
$(function(){
// This is standard userecho widget object.
var default_code = {
host: 'yoursite.userecho.com',
forum: '111111',
lang: 'en',
tab_corner_radius: 5,
tab_font_size: 20,
tab_image_hash: 'ZmVlZGJhY2s%3D',
tab_chat_hash: 'Y2hhdA%3D%3D',