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
| import javax.swing.*; | |
| import java.lang.*; | |
| class FlagDrawer { | |
| private int countryCode; | |
| private int flagWidth; | |
| private int flagHeight; | |
| public static void main(String args[]) { |
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
| // | |
| // BottomViewController.swift | |
| // SwipeUpViewControllerDemo | |
| // | |
| // Created by Lange, Josef on 7/14/14. | |
| // | |
| import UIKit | |
| class BottomViewController: UIViewController { |
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
| // | |
| // RevealingViewController.m | |
| // | |
| // Created by Lange, Josef on 7/15/14. | |
| // | |
| #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
| #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
| #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
| #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) |
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
| Verifying I am +josefdlange on my passcard. https://onename.com/josefdlange |
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
| class Pet(object): | |
| fur_length = 10 | |
| is_alive = False | |
| def __init__(self, name): | |
| self.name = name | |
| fido = Pet("Fido") | |
| fluffy = Pet("Fluffy") |
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
| - (UIImage *)resizedWithNewSize:(CGSize)size contentMode:(UIViewContentMode)contentMode { | |
| CGFloat x = 0.0f; | |
| CGFloat y = 0.0f; | |
| CGFloat w = size.width; | |
| CGFloat h = size.height; | |
| BOOL scale = YES; | |
| switch (contentMode) { | |
| case UIViewContentModeScaleToFill: { | |
| break; | |
| } |
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
| import logging | |
| import logging.handlers | |
| """ | |
| Call me once at initialization of your application. | |
| @param level A level from the logging package. You can also | |
| pass in common levels as strings, I believe ('INFO', 'DEBUG', etc) | |
| """ | |
| def setup_logging(level): |
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
| set-option -g default-command "reattach-to-user-namespace -l zsh" | |
| set -g mode-mouse on | |
| set -g mouse-resize-pane on | |
| set -g mouse-select-pane on | |
| set -g mouse-select-window on | |
| set -g default-terminal "screen-256color" | |
| set-option -g allow-rename off |
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
| set-option -g default-command "reattach-to-user-namespace -l zsh" | |
| set -g mouse on | |
| set -g default-terminal "screen-256color" | |
| set-option -g allow-rename off | |
| set-option -g renumber-windows on | |
| source ~/.tmuxline.sh |
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
| import json | |
| from json import JSONEncoder | |
| class MyComplexObject(object): | |
| """ | |
| A trivial Python object that has its own special serialized output | |
| that for some reason would differ from __repr__. | |
| """ | |
| def __init__(self, arbitrary_value, optional_value=None): |
OlderNewer