Skip to content

Instantly share code, notes, and snippets.

View mykhas's full-sized avatar

Mykhaś Kobernyk mykhas

View GitHub Profile
@justinhj
justinhj / translate.org
Created November 1, 2016 17:18
Translate tables of English words to Mandarin using python translate and org babel

-*- mode: org; org-confirm-babel-evaluate: nil; -*-

from translate import Translator
translator=Translator(to_lang="zh")
translated=translator.translate(translatetext)
@avendael
avendael / .emacs
Last active March 29, 2020 19:53 — forked from ef4/.emacs
Flycheck with JSCS
;; Flycheck JSCS
(flycheck-def-config-file-var flycheck-jscs javascript-jscs ".jscs.json"
:safe #'stringp)
(flycheck-define-checker javascript-jscs
"A JavaScript code style checker.
See URL `https://github.com/mdevils/node-jscs'."
:command ("jscs" "--reporter" "checkstyle"
(config-file "--config" flycheck-jscs)
source)
:error-parser flycheck-parse-checkstyle
Introduction #1 (2 x 45)
About this course (45)
Frontend engineering introduction (45)
- web development is
- history
- current situation
- languages and platforms
- FE definition
- Job specific
- knowledge areas
@husa
husa / node_build.json
Last active December 18, 2015 04:10
Node js Build for Sublime Text 2 To import it to Sublime Text: Tools -> Build System -> New Build System, and paste this code there To use: Tools -> Build System, and select your newly created build
// new build
{
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js"
}
//key bindings for build
[
{ "keys": ["ctrl+b"], "command": "build" },
{ "keys": ["ctrl++alt+b"], "command": "exec", "args": {"kill": true} }
anonymous
anonymous / gist:4335774
Created December 19, 2012 10:24
Counter test task
// Задание: написать плагин для tinymce, которые позволяет визуально редактировать шорткоды счетчиков
// Шорткод счетчика выглядит так [counter color="red"]123[/counter] где red - цвет счетчика, а 123 - его значение
// Счетчики могут быть вложенными, например [counter]123[counter]234[/counter][/counter]
// Визуально при редактировании счетчик должен выглядеть как
// <div style="border:2px solid black;background:{{ counterColor }}">{{ counterValue }}</div>
// Для вашего удобства мы уже написали основу плагина ниже
// Ссылку на решение можете давать на вашем хостинге или на fiddle.tinymce.com
@vojtajina
vojtajina / all-templates.html
Created August 15, 2012 00:00
AngularJS: load all templates in one file
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>
@kirs
kirs / PayController.php
Created July 28, 2011 06:47
PayController.php
<?php
class PayController extends Controller
{
public function actionIndex()
{
$this->render('about',array());
}
public function actionForm()
@Andrew8xx8
Andrew8xx8 / yii_examples.php
Created April 4, 2011 08:31
Примеры использования различных функций и виджетовв yii
<?php
/**
* Генерация ссылок
*/
// Создать урл по псевдониму пути
// В зависимости от настроек урлменеджера вернёт полный http путь к скрипту
// например http://webapp.local/index.php?r=site/index
Yii::app()->createUrl('site/index');