Skip to content

Instantly share code, notes, and snippets.

View thetealpickle's full-sized avatar

thetealpickle thetealpickle

View GitHub Profile
// definition
protocol Human {
var food: String { get }
func speak(_ str: String)
func interact() -> String
func eat()
}
// adoption
@thetealpickle
thetealpickle / .bash_profile
Last active October 9, 2022 17:18
THETEALPICKLE bash profile
## Aliases
# [A] bash profile
alias bp="vim ~/.bash_profile"
alias sbp="source ~/.bash_profile"
# [A] folder paths
## PRIVATE ##
# [A] git
alias g.="git add ."
@thetealpickle
thetealpickle / PieView.swift
Created April 17, 2018 15:13
Customizable PieView using @IBDesignable/@IBInspectable
// Created by Jessica Joseph on 4/17/18.
// Copyright © 2018 TFH. All rights reserved.
import UIKit
@IBDesignable
class PieView: UIView {
var backgroundLayer: CAShapeLayer!
@IBInspectable var backgroundLayerColor: UIColor? = UIColor.darkGray {
@thetealpickle
thetealpickle / MyApp.java
Last active August 29, 2015 14:36 — forked from artem-zinnatullin/MyApp.java
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}