Skip to content

Instantly share code, notes, and snippets.

View fbeeper's full-sized avatar
🤩

Ferran Poveda fbeeper

🤩
View GitHub Profile
@fbeeper
fbeeper / UsableAccentMarks.md
Last active August 29, 2015 14:06
Usable accentuation on MacOS Lion and above (including Yosemite!)

Usable accent marks on MacOS Lion and above (including Yosemite!)

Since Mac OS Lion, default "press and hold" of keyboard keys brings an easy access to accents and special characters:

alt text

However, who designed the order of elements in these lists is CLEARLY NOT using them with enough frequency*. Depending with what vowel you invoke this tool, the order of diacritical mark is different:

a à á â ä æ ã å ā
@fbeeper
fbeeper / gist:4605145
Last active December 11, 2015 13:08
I need to copy file paths every few minutes, and I want to do it directly from Finder... So I did this to satisfy my needs. You might want to ease your live with it too :P

Copy file path on MacOS Finder to your clipboard

Run the following simple oneliner to download and "install" the service:

curl -L https://dl.dropbox.com/s/xekk5ntkk969ty6/copyfilepath_service.tar.gz | tar zx -C ~/Library/Services/

And find the new option in the contextual menu under Services > copy file path while selecting files or folders in Finder.

💥 you might want to set a shortcut for that action:

@fbeeper
fbeeper / Readme.md
Created June 19, 2013 17:11
Conditional (and colorful) comments for a happy LaTeX drafting of your PhD thesis or whatever you're doing :)

Conditional (and colorful) comments for LaTeX drafting

With this simple script you'll be able to add colorful:

  • Comments (Orange): Things that you want to say about the text but are not the text),
  • TODOs (Red): Things you want to note to do in the future keep track), and...
  • Skeleton (Green): Those things that you (or maybe it's just me) write to organize what you are writing.

While editing use:

Securely encrypted ZIPs right from contextual menu in Mac OS

Run the following simple oneliner to download and "install" the service:

curl -L https://dl.dropbox.com/s/wpxbnm8y6gb6l32/compressWithPassword.tar.gz | tar zx -C ~/Library/Services/

And while selecting files or folders in Finder you will find the new option

Services > Compress with password

@fbeeper
fbeeper / easyiosapps
Created September 15, 2014 17:30
Finally! Here's the easy access to your iOS8 simulator apps you've been looking for :)
#!/bin/bash
#
# Using the information available in the new iOS8 simulator for each
# device/runtime (device.plist), this script creates a readable folder structure
# (no UDIDs, just simple device/runtime names). Inside that structure it creates
# soft links to your apps in development.
#
# You can run this script every time you install an app to your simulator, or
# you can simply call it to access this folder making sure it will always be
# updated :)
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@brynbodayle
brynbodayle / gist:de70eb6a392e90272707
Created July 25, 2014 16:29
Multiline UIButton + Auto Layout
- (CGSize)intrinsicContentSize {
CGSize boundingSize = CGSizeMake(self.titleLabel.preferredMaxLayoutWidth - self.titleEdgeInsets.left - self.titleEdgeInsets.right, CGFLOAT_MAX);
NSAttributedString *attributedTitle = [self attributedTitleForState:self.state];
CGRect boundingRect;
if(attributedTitle) {
@maciekish
maciekish / UINavigationBar+CustomHeight.h
Created September 10, 2014 08:48
Custom UINavigationBar height working in iOS 7 and 8. To use, find your navigation bar reference and just setHeight:200 etc.
//
// UINavigationBar+CustomHeight.h
//
// Copyright (c) 2014 Maciej Swic
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@sjl
sjl / Menlo-ForPowerline.ttc.zip
Created January 17, 2012 18:09
Patched Menlo for Powerline. This one includes the bold, italic, etc variants.
@nuthatch
nuthatch / iOS 7 dynamic font mappings
Last active January 9, 2023 13:55
What is UIFontTextStyleHeadline *really*? Dump out preferredFontForTextStyle for UIFontTextStyleHeadline, UIFontTextStyleSubheadline, UIFontTextStyleBody, UIFontTextStyleFootnote, UIFontTextStyleCaption1, UIFontTextStyleCaption2 to examine the font name, weight, and point size.
+ (void)describePreferredFonts
{
static NSArray *textStyles;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
textStyles = @[UIFontTextStyleHeadline,
UIFontTextStyleSubheadline,
UIFontTextStyleBody,
UIFontTextStyleFootnote,
UIFontTextStyleCaption1,