Skip to content

Instantly share code, notes, and snippets.

View sxua's full-sized avatar
🇺🇦

Oleksandr Skrypnyk sxua

🇺🇦
View GitHub Profile
@sxua
sxua / xcassets-export.rb
Last active July 29, 2021 20:30
Export colors from Xcode into CSV
require "csv"
require "json"
XCASSETS_NAME = "Colors.xcassets"
CSV.open(XCASSETS_NAME + ".csv", "wb") do |csv|
csv << ["Name", "Appearance", "HEX Value", "Alpha"]
Dir.glob(XCASSETS_NAME + "/**/*.colorset/Contents.json") do |file_name|
file = File.read(file_name)

Keybase proof

I hereby claim:

  • I am sxua on github.
  • I am sxua (https://keybase.io/sxua) on keybase.
  • I have a public key ASA83236AtjLCSquLnVSfiYLb2JA3HS_Kv_TaA_Mi0U2cwo

To claim this, I am signing this object:

diskutil mount Recovery\ HD
hdiutil mount /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg
@sxua
sxua / save_drawables.jsx
Created September 3, 2014 15:29
Illustrator script for saving drawables
/**
* Remixer 1: @herkulano (http://www.herkulano.com)
* Remixer 2: @hotappsfactory (http://www.hotappsfactory.com)
* Thanks to: Niels Bosma (niels.bosma@motorola.com)
*/
var folder = Folder.selectDialog();
var document = app.activeDocument;
var imageName;
@sxua
sxua / UIAppearance.md
Created September 18, 2013 17:19
UIAppearance methods (including iOS 7)

UIActivityIndicatorView

5.0

@property (readwrite, nonatomic, retain) UIColor *color

UIBarButtonItem

--- pdftk/Makefile.OSX-10.6.orig 2013-07-24 21:27:36.000000000 +0300
+++ pdftk/Makefile.OSX-10.6 2013-08-12 19:44:24.000000000 +0300
@@ -20,13 +20,13 @@
# tools
# need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME)
-TOOLPATH=/sw/lib/gcc4.5/bin/
-export VERSUFF=-fsf-4.5
+TOOLPATH=@HOMEBREW_PREFIX@/bin/
+export VERSUFF= -4.6
@sxua
sxua / 0-README.md
Created October 21, 2012 21:18 — forked from juno/README.md
Install rbenv and ruby-build on Ubuntu

Install rbenv and ruby-build on Ubuntu.

@sxua
sxua / install_headers.sh
Created October 13, 2012 16:57
Install debugger on ruby 1.9.3-p286 while debugger-ruby_core_source have no headers
git clone git://github.com/cldwalker/debugger-ruby_core_source.git
cd debugger-ruby_core_source
curl https://github.com/cldwalker/debugger-ruby_core_source/pull/3.patch | git am
gem install archive-tar-minitar
rake gem
gem install pkg/debugger-ruby_core_source-1.1.4.gem
@sxua
sxua / 0-readme.md
Created October 13, 2012 16:14 — forked from burke/0-readme.md
ruby-1.9.3-p286 cumulative performance patch.

Patch for ruby 1.9.3-p327 is here: https://gist.github.com/4063779

Patched ruby 1.9.3-p286 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p286 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

@sxua
sxua / CoffeeScript_jQuery_Plugin_Pattern.coffee
Created September 28, 2012 22:28 — forked from adtaylor/CoffeeScript_jQuery_Plugin_Pattern.coffee
This is a CoffeeScript implementation of Twitter Bootstrap's approach to jQuery plugin development
# ============================================================
# PluginName v0.0.0
# http://URL
# ============================================================
# Copyright 2012 The Beans Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#