Skip to content

Instantly share code, notes, and snippets.

@fdln
fdln / gist:4156389
Created November 27, 2012 19:20 — forked from pckujawa/gist:2246183
android coverflow widget
/*
* Copyright (C) 2010 Neil Davies
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@fdln
fdln / gist:4156397
Created November 27, 2012 19:21 — forked from pckujawa/gist:2246185
android coverflow widget example
/*
* Copyright (C) 2010 Neil Davies
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
--- Animal.lua
--
-- A simple example of a base class usng the classes library.
--
-- @author PaulMoore
--
-- Copyright (C) 2011 by Strange Ideas Software
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
--- base64.lua
--
-- https://gist.github.com/2563975
--
-- V0.3 for Lua 5.1
--
-- A simple Base64 encoder/decoder that uses a URL safe variant of the standard.
-- This implementation encodes character 62 as '-' (instead of '+') and character 63 as '_' (instead of '/').
-- In addition, padding is not used by default.
-- A full description of the specification can be found here: http://tools.ietf.org/html/rfc4648
@fdln
fdln / purge.sh
Created January 8, 2014 17:02 — forked from ekinertac/purge.sh
#!/bin/bash
# Free unused memory
flush_mem () {
sync
echo 3 | tee /proc/sys/vm/drop_caches
}
echo -e "\nMemory usage before purge:\n" && free -m
@fdln
fdln / Custom.css
Created January 19, 2014 07:03 — forked from drewwells/Custom.css
/**********************************************/
/*
/* Solarized Dark Skin by Mark Osborne - 2011
/*
/* Based on IR_Black Skin by Ben Truyman:
/* https://gist.github.com/1245727
/*
/* and Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
#Create a new file in your home directory called .gtkrc-eclipse
# call eclipse with this command:
# env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/USER/.gtkrc-eclipse '/path_to_eclipse/eclipse'
# In your Eclipse directory find the file 'plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css'
# (there's an * in there, because I guess that the version may change in the future or may be different already).
# In this file there's a CSS class:
#.MPartStack {
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Android
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta charset="utf-8">-->
<!-- iPad/iPhone specific css below, add after your main css >
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
// Auto layout in a Swift Playground (for iOS).
import UIKit
var v = UIView()
v.frame = CGRectMake(0, 0, 200, 200)
var b1 = UIButton()
b1.setTitle("Click Me", forState:UIControlState.Normal)
b1.setTitleColor(UIColor.blueColor(), forState: UIControlState.Normal)