sudo apt install openjdk-8-jdk-headless
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using namespace System.Management.Automation | |
using namespace System.Management.Automation.Language | |
### shamelessly copied from https://raw.githubusercontent.com/lzybkr/PSReadLine/master/PSReadLine/SamplePSReadLineProfile.ps1 | |
# This is an example profile for PSReadLine. | |
# | |
# This is roughly what I use so there is some emphasis on emacs bindings, | |
# but most of these bindings make sense in Windows mode as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; https://superuser.com/a/1015744/404619 | |
!Left::Send("{Home}") | |
!Right::Send("{End}") | |
!+Left::Send("{Shift down}{Home}{Shift up}") | |
!+Right::Send("{Shift down}{End}{Shift up}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ------------ | |
# Profile: GPU | |
# ------------ | |
echo 578000000 > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk | |
echo simple_ondemand > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor | |
echo 15 > /sys/module/adreno_idler/parameters/adreno_idler_downdifferential | |
echo 15 > /sys/module/adreno_idler/parameters/adreno_idler_idlewait | |
echo 6000 > /sys/module/adreno_idler/parameters/adreno_idler_idleworkload |
It will check if current branch is master, then ask a confirmation, in case of master
branch
Articles with initial info: https://dev.ghost.org/prevent-master-push/, https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARNING: SIDE-EFFECTS. ONLY FOR PROD VERSION | |
if (!__DEV__) { | |
require('./utils/log.js'); | |
} | |
// SIDE-EFFECTS END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
try { | |
var newBranchButton = document.querySelector('#new-branch > a.available'); | |
var title = newBranchButton.title || newBranchButton.dataset.originalTitle; | |
if (!title) { | |
alert("Can't find New Branch button"); | |
return; | |
} | |
var copied = false; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installs puppet, java and android-sdk | |
curl -sS https://raw.githubusercontent.com/hashicorp/puppet-bootstrap/master/ubuntu.sh | sh | |
puppet module install 7terminals-java | |
puppet module install maestrodev-android | |
manifest_path="/tmp/manifest-sdk.pp" |
В основе: Написать реализацию EventEmitter с некоторыми улучшениями и примесь для использования его API. Сам EventEmitter - глобальный синглетон.
API класса:
- emit(eventName, payload): инициирует событие eventName с данными payload
- on(eventName, handler): подписывает обработчик события handler на событие eventName.
- off(eventName, handler): отписывает обработчик события handler от события eventName
Пример использования:
const EventEmitter = ...