Skip to content

Instantly share code, notes, and snippets.

View kennydude's full-sized avatar

Joe Simpson kennydude

View GitHub Profile
@kennydude
kennydude / microgallery.md
Last active September 27, 2015 19:34
microgallery

Microgallery

Microgallery is the newer and better version of newb. Sadly it is slightly bigger (18kb vs 12kb) but it's got a few more features.

Could be better, but it does the job for me :)

  • OOP design
  • Darker oooh
  • Mass updater
  • Descriptions!
@kennydude
kennydude / post.md
Created September 16, 2014 21:21
How PowerLine Works

How Does The Powerline thing work?

I recently was enlightened to Powerlines, the cool terminal thing that looks really cool.

But, me being me I wanted to know how this thing worked, but nobody has wrote anything and I've found out.

Basically the "patched fonts" just add some symbols like arrows and git icons so they render in your terminal properly.

By Powerline, I mean this thing:

.card{
background: #FFF;
border-radius: 2px;
border: 1px solid #ddd;
border-bottom-width: 2px;
margin-bottom: 10px;
}
<html><head>
<meta charset="UTF-8">
<!--
Copyright (c) 2013 by Joe Simpson (http://codepen.io/kennydude/pen/CnDAz)
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 furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@kennydude
kennydude / ExtendedEditText.java
Created April 17, 2013 21:35
Ever wanted a prefix and suffix on your EditText? Yes, well this ExtendedEditText class will do it for you!
package me.kennydude.spending.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.*;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.text.Editable;
import android.text.TextPaint;
import android.text.TextWatcher;
@kennydude
kennydude / class.java
Created March 4, 2013 12:37
Custom style *should work roughly*
public static class BigPictureStyle extends Style {
private Bitmap mPicture;
private Bitmap mBigLargeIcon;
private boolean mBigLargeIconSet = false;
public BigPictureStyle() {
}
public BigPictureStyle(Builder builder) {
setBuilder(builder);
@kennydude
kennydude / gist:4953168
Created February 14, 2013 14:30
Success!!!!
while(noSuccess){
try{
tryAgain();
} catch(InvalidStateException e){
break;
} catch(SleepDeprevationException e){
sleep( new Hours(8) );
} catch(DeathException e){
break;
}
package me.kennydude.transtimetable.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.util.StateSet;
public class TabBackgroundDrawable extends Drawable {
@kennydude
kennydude / tumblr-unac.html
Created September 29, 2012 20:24
tumblr-unac.html
<div class="uac" style="background: #333; opacity: 0.9; position: absolute; top:0;left:0;bottom:0;right:0;display:none">
</div>
<div style="position: fixed; top: 50px; right: 0; left: 0; z-index: 999999999;display:none" class="uac">
<div style="background:#fff; margin: 0 auto; text-align: center; width:500px">
<h1>YOU ARE</h1>
<img src="http://25.media.tumblr.com/tumblr_mb4mphniug1qlqeu2o1_500.gif" />
</div></div>
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript">
@kennydude
kennydude / Activity.java
Created August 29, 2012 13:43
ProgressBar in ActionBar
public boolean onCreateOptionsMenu(final Menu menu) {
// Inflate Layout here
// ProgressBar
if(isRefreshing){
ProgressBar p = new ProgressBar(this, null, android.R.attr.progressBarStyleSmall);
menu.findItem(R.id.refreshAction).setActionView(p).setEnabled(false);
}
// Do other crazy stuff here