When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}| #!/bin/sh | |
| vim="vim $1 $2 $3" | |
| osascript -e " | |
| tell application \"iTerm\" | |
| set myterm to (create window with default profile) | |
| tell myterm | |
| activate current session | |
| launch session \"Default Session\" | |
| tell the current session |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Canvas; | |
| import android.graphics.Rect; | |
| import android.graphics.drawable.Drawable; | |
| import android.support.v4.content.ContextCompat; | |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.View; |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Bucket | |
| type = "2" | |
| version = "2.0"> | |
| <Breakpoints> | |
| <!-- All Exceptions --> | |
| <BreakpointProxy | |
| BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
| <BreakpointContent |
| #!/usr/bin/env python | |
| # | |
| # Adds the ability to add / modify tasks using a "blocks:" attribute, | |
| # the opposite of "depends:". | |
| # | |
| # This script acts as an on-modify, on-add and on-launch hook at the same time. | |
| # | |
| ### SETUP | |
| # Save this file as | |
| # ~/.task/hooks/on-modify.blocks_attr.py |
| // The Very Basic | |
| new AsyncTask<Void, Void, Void>() { | |
| protected void onPreExecute() { | |
| // Pre Code | |
| } | |
| protected Void doInBackground(Void... unused) { | |
| // Background Code | |
| return null; | |
| } | |
| protected void onPostExecute(Void unused) { |
| // Slide up animation | |
| <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <translate | |
| android:duration="@android:integer/config_mediumAnimTime" | |
| android:fromYDelta="100%" | |
| android:interpolator="@android:anim/accelerate_interpolator" | |
| android:toXDelta="0" /> |
| NSString* string = @"Hello World"; | |
| UIFont *font = [UIFont fontWithName:@"Helvetica-BoldOblique" size:21]; | |
| CGSize constraint = CGSizeMake(300,NSUIntegerMax); | |
| NSDictionary *attributes = @{NSFontAttributeName: font}; | |
| CGRect rect = [string boundingRectWithSize:constraint | |
| options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) |
Looking at the officiel Twitter Android client I've noticed the slight cool & sexy transition between activities. I was curious to know how that worked so I had fun with android xml animations and ended up with that:
push_left_in.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate