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
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. |
; 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}") |
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
#!/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 |
// WARNING: SIDE-EFFECTS. ONLY FOR PROD VERSION | |
if (!__DEV__) { | |
require('./utils/log.js'); | |
} | |
// SIDE-EFFECTS END |
(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 { |
#!/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 класса:
Пример использования:
const EventEmitter = ...