Skip to content

Instantly share code, notes, and snippets.

View webdevotion's full-sized avatar

Bram Plessers webdevotion

View GitHub Profile
@lukeredpath
lukeredpath / UITextField+RACKeyboardSupport.m
Last active April 19, 2017 10:36
ReactiveCocoa signal for keyboard done button taps
#import "UITextField+RACKeyboardSupport.h"
#import <ReactiveCocoa/RACEXTScope.h>
#import <ReactiveCocoa/NSObject+RACDescription.h>
@implementation UITextField (RACKeyboardSupport)
- (RACSignal *)rac_keyboardReturnSignal {
@weakify(self);
return [[[[RACSignal
defer:^{
@yoichitgy
yoichitgy / mergegenstrings.py
Last active July 9, 2022 23:59
A script to generate .strings file for .swift, .m, .storyboard and .xib files by genstrings and ibtool commands, and merge them with existing translations.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Localize.py - Incremental localization on XCode projects
# João Moreno 2009
# http://joaomoreno.com/
# Modified by Steve Streeting 2010 http://www.stevestreeting.com
# Changes
# - Use .strings files encoded as UTF-8
@registerTask 'generateRandomLengthFile', () ->
# Generate random length file
var myRandomLengthString = 'todo'
# Write the file
scssfile = grunt.file.write("my-includes-folder/includes.html", myRandomLengthString)
@webdevotion
webdevotion / pixelmator-pro-layers-in-folders-export-to-images.scpt
Last active July 13, 2021 09:44
Applescript for Pixelmator Pro documents to export all layers in nested folders as images files.
on list2string(theList, theDelimiter)
-- First, we store in a variable the current delimiter to restore it later
set theBackup to AppleScript's text item delimiters
-- Set the new delimiter
set AppleScript's text item delimiters to theDelimiter
-- Perform the conversion
set theString to theList as string