This is a curated set of conventions and best practices for Stylus, an expressive, dynamic, robust and advanced CSS preprocessor. Frustrated with there not being a set of conventions set in place (that could be easily found), I set forth to find out on my own.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; | |
[library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *libraryStop) { | |
NSInteger assetCount = [group numberOfAssets]; | |
NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:assetCount-1]; | |
[group enumerateAssetsAtIndexes:indexes options:NSEnumerationReverse usingBlock:^(ALAsset *result, NSUInteger index, BOOL *groupStop) { | |
if(result){ | |
CGImageRef imageRef = [[result defaultRepresentation] fullResolutionImage]; | |
UIImage *image = [UIImage imageWithCGImage:imageRef]]; | |
// Do stuff with the image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa 2048 > host.key | |
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert | |
#[enter *.localhost.dev for the Common Name] | |
openssl x509 -noout -fingerprint -text < host.cert > host.info | |
cat host.cert host.key > host.pem | |
Trust cert | |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain host.cert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), | |
NULL, | |
notificationCenterHookProc, | |
NULL, | |
NULL, | |
CFNotificationSuspensionBehaviorDeliverImmediately); | |
void notificationCenterHookProc (CFNotificationCenterRef center, | |
void *observer, |
To open SQLite Things.app database run this command in Terminal.app:
$ sqlite3 ~/Library/Containers/com.culturedcode.things/Data/Library/Application\ Support/Cultured\ Code/Things/ThingsLibrary.db
In SQLite command-line type this query to get your tasks stats:
sqlite> .mode column
sqlite> .header on
sqlite> select zscheduler, zstatus, ztrashed, count(*) from ZTHING where z_ent = 13 group by zstatus,ztrashed order by Z_pk desc;
ZSCHEDULER ZSTATUS ZTRASHED count(*)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:window.location.href=window.location.href.replace("https://","ioc://"); |
This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.
- Set
-moz-appearance
tonone
. This will "reset" the styling of the element; - Set
text-indent
to0.01px
. This will "push" the text a tiny bit[1] to the right;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSAttributedString+StringFromHTML.m | |
// Artsy | |
// | |
// Created by Orta on 06/08/2013. | |
// Copyright (c) 2013 Art.sy. All rights reserved. | |
// | |
// This doesn't produce acceptable enough results, and thus is relagated here for another day sometime |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for: