Skip to content

Instantly share code, notes, and snippets.

Max Sysoev ColCh

Block or report user

Report or block ColCh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View profile.sh
#!/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
@ColCh
ColCh / README.md
Last active Nov 22, 2018
Git pre-push hook to confirm pushing to master
View README.md
@ColCh
ColCh / app.js
Created Feb 24, 2017
catch errors and send 'em to Crashlytics in React Native
View app.js
// WARNING: SIDE-EFFECTS. ONLY FOR PROD VERSION
if (!__DEV__) {
require('./utils/log.js');
}
// SIDE-EFFECTS END
@ColCh
ColCh / main.js
Created Feb 22, 2017
Copy new branch name to clipboard on issue page in GitLab
View main.js
(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 {
@ColCh
ColCh / README.md
Last active Jun 5, 2019
Create merge request on Gitlab in command line for current branch
View README.md

Gitlab merge request script

Creates merge request on Gitlab for you

Installation

Download it, add executable perms and place into PATH:

# Place it into ~/.bin
mkdir ~/.bin
@ColCh
ColCh / Provision-android-sdk.sh
Created Dec 10, 2015
Install puppet, java and android-sdk
View Provision-android-sdk.sh
#!/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"
@ColCh
ColCh / Brief.md
Last active Oct 22, 2015
Max Quest
View Brief.md

В основе: Написать реализацию EventEmitter с некоторыми улучшениями и примесь для использования его API. Сам EventEmitter - глобальный синглетон.

API класса:

  • emit(eventName, payload): инициирует событие eventName с данными payload
  • on(eventName, handler): подписывает обработчик события handler на событие eventName.
  • off(eventName, handler): отписывает обработчик события handler от события eventName

Пример использования:

const EventEmitter = ...
You can’t perform that action at this time.