Skip to content

Instantly share code, notes, and snippets.

View denysbutenko's full-sized avatar

Denys Butenko denysbutenko

View GitHub Profile
@denysbutenko
denysbutenko / svgo.json
Created November 14, 2018 21:02
SVGO config for Sketch
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": true,
"indent": 2,
"plugins": [
{
"name": "cleanupIDs"
},
{
"name": "cleanupListOfValues"
@denysbutenko
denysbutenko / gist:9c74161041913dddd59a35e1f8ac18eb
Created December 9, 2016 16:05
Спам такси Украины
TAXILETO
380994123762
380661364267
TAXIAGAT
TaxiMarka
TAXIMADAM
MagDakTaxi
TAKCI_777
DominoTaxi
TAXIBARBI

Keybase proof

I hereby claim:

  • I am denysbutenko on github.
  • I am denysbutenko (https://keybase.io/denysbutenko) on keybase.
  • I have a public key whose fingerprint is 76F0 9FEE 8FA2 8217 8DC4 2677 8395 1AC2 DA85 67A7

To claim this, I am signing this object:

@denysbutenko
denysbutenko / private.xml
Created November 19, 2014 08:07
Remap Fn+F1 to F1 in iTerm2 for Karabiner.
<?xml version="1.0"?>
<root>
<appdef>
<appname>ITERM</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<item>
<name>itermfkeys</name>
<identifier>itermfkeys</identifier>
<only>ITERM</only>
@denysbutenko
denysbutenko / remove_non_unique_values_from_list.py
Created September 12, 2014 17:01
Remove non-unique elements from list
def remove_non_unique_values(test):
return [el for el in test if test.count(el) > 1]
if __name__ == '__main__':
list_1 = [1, 2, 3, 1, 3]
list_2 = [1, 2, 3, 4, 5]
list_3 = [5, 5, 5, 5, 5]
list_4 = [10, 9, 10, 10, 9, 8]
print "===="
print "Input >> Output"
def test_func(test):
return dict(zip(test[0::3], map(list, zip(test[1::3], test[2::3]))))
if __name__ == '__main__':
test_list = range(1, 10)
print "===="
print "Original list: {0}".format(test_list)
print "Transformed into dict: {0}".format(test_func(test_list))
print "===="
/* start Layout */
.block-sidebar {
.make-md-column(4);
.make-lg-column(3);
.clearfix;
@media(min-width: @screen-md) {
padding-right: 0;
}
}
import os
from zipfile import ZipFile
from StringIO import StringIO
from urllib import urlopen
from sys import platform as _platform
def unzip_from_stream(url, dest_dir):
original_zip = ZipFile(StringIO(urlopen(url).read()))
if _platform == "win32":
@denysbutenko
denysbutenko / private.xml
Created July 25, 2014 15:14
Caps Lock config for Karabiner.
<?xml version="1.0"?>
<root>
<item>
<name>Caps Lock становится F19</name>
<appendix>F19 работает как Shift+Ctrl+Cmd+Opt+Space. Просто F19 работает как клавиша Esc.</appendix>
<identifier>private.f192f19_escape</identifier>
<autogen>
--KeyOverlaidModifier--
KeyCode::F19,
KeyCode::SPACE,