Skip to content

Instantly share code, notes, and snippets.

View kholodilov's full-sized avatar

Dmitry Kholodilov kholodilov

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kholodilov on github.
  • I am kholodilov (https://keybase.io/kholodilov) on keybase.
  • I have a public key ASD6qEwKzbCzuicKstazD-0nA2OVV8ZjJ-_VwzWT--ZnLgo

To claim this, I am signing this object:

@kholodilov
kholodilov / ddcctl-level
Last active November 22, 2016 23:27
dddctl-level
#!/bin/bash
# git clone https://github.com/kfix/ddcctl.git
# make install
# copy this file to /usr/local/bin
# to use in Alfred put "info.plist" into zip archive named "Display brightness.alfredworkflow" and double click on it
dddctl="/usr/local/bin/ddcctl -d 2"
@kholodilov
kholodilov / compress_string.scala
Last active July 16, 2016 16:34
compress string
// simple
def compressSimple(s: String): String = {
s.headOption.map { head =>
var current = head
var count = 1
val compressed = new StringBuilder()
s.tail.foreach { next =>
if (current == next) {
count = count + 1
tell application "OmniFocus"
tell front window
set selectedItems to value of selected trees of content
set theKey to (do shell script "defaults read io.postach.kholodilov 'rescuetime.api.key'")
repeat with theTask in selectedItems
@kholodilov
kholodilov / Custom Comparisons.sublime-settings
Last active August 29, 2015 14:04
Sublimerge custom comparisons
{
"custom_comparisons_user": [
/************************************* GIT *************************************/
/*
* Custom Git comparison. Displays quick panel with modified files and allows to compare working copy to HEAD to see uncommited changes.
*/
{
"name": "Show All Uncommited Changes...", //comparison name
"requires": "git", //What does it require. Currently 'git', 'svn' 'hg' or null (if doesn't require any of VCS)