Skip to content

Instantly share code, notes, and snippets.

View carlinyuen's full-sized avatar
😬
Life. I may be slow to respond.

Carlin carlinyuen

😬
Life. I may be slow to respond.
View GitHub Profile
@addyosmani
addyosmani / LICENSE.txt
Last active April 8, 2024 20:15 — forked from 140bytes/LICENSE.txt
Offline Text Editor in < 140 bytes (115 bytes). Powered by localStorage & contentEditable
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Copyright (C) 2014 ADDY OSMANI <addyosmani.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@ArtSabintsev
ArtSabintsev / Native Base64 (Pre iOS7)
Created September 11, 2013 06:19
A category on NSString that exploits a set of CoreFoundation methods to create Base64 encoded strings. This is a simple solution that removes the need for external Base64 libraries in projects that targets apps that support iOS 2 - iOS 6. iOS 7 has a more concrete solution, but due to NDA, I cannot post it yet.
+ (NSString *)base64EncodeString:(NSString *)stringToEncode
{
CFHTTPMessageRef messageRef = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, FALSE);
CFHTTPMessageAddAuthentication(messageRef, NULL, CFSTR("AS"), (__bridge CFStringRef)stringToEncode, kCFHTTPAuthenticationSchemeBasic, FALSE);
CFStringRef authStringRef = CFHTTPMessageCopyHeaderFieldValue(messageRef, CFSTR("Authorization"));
NSString *encodedString = [(__bridge NSString *)authStringRef substringFromIndex:10];
CFRelease(messageRef);
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 14, 2024 03:50
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active September 22, 2024 08:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname