Skip to content

Instantly share code, notes, and snippets.

View skywinder's full-sized avatar
:octocat:

Petr Korolev skywinder

:octocat:
View GitHub Profile
@skywinder
skywinder / Flood.swift
Last active April 18, 2016 15:22 — forked from futurepaul/Flood.swift
The biblical flood, in Swift
let 🌍 = "🐶🐺🐱🐭🐹🐰🐸🐯🐨🐻🐷🐽🐮🐗🐵🐒🐴🐑🐘🐼🐧🐦🐤🐥🐣🐔🐍🐢🐛🐝🐜🐞🐌🐙🐚🐠🐟🐬🐳🐋🐄🐏🐀🐃🐅🐇🐉🐎🐐🐓🐕🐖🐁🐂🐲🐡🐊🐫🐪🐆🐈🐩"
var 🚢: [String] = []
for 👾 in 🌍.characters {
let 💕 = String(👾)
🚢.append(💕 + 💕)
}
🚢
@skywinder
skywinder / create_fat_framework.sh
Last active October 14, 2018 15:41
Export “fat” Cocoa Touch Framework (for Simulator and Device)
#run this script from Product page in your project Derived Data folder
framework_name="${$(basename $(find ./Debug-iphoneos -type d -name '*.framework' -maxdepth 1))%.*}" && \
cp -R Debug-iphoneos/$framework_name.framework ./$framework_name.framework && \
lipo -create -output "$framework_name.framework/$framework_name" \
"Debug-iphonesimulator/$framework_name.framework/$framework_name" \
"Debug-iphoneos/$framework_name.framework/$framework_name"
@skywinder
skywinder / idea_native_clipboard_support
Last active August 29, 2015 14:15
idea_native_clipboard_support - for quickly fix idea.properties file
#!/usr/bin/env bash
if [ -n "$1" ]
then
if grep "ide.mac.useNativeClipboard=" "$1"/Contents/bin/idea.properties > /dev/null
then
if grep "ide.mac.useNativeClipboard=false" "$1"/Contents/bin/idea.properties > /dev/null
then
echo "ide.mac.useNativeClipboard=false found -> change to true"