Skip to content

Instantly share code, notes, and snippets.

View painejake's full-sized avatar

Jake Paine painejake

  • Instiller
  • Birmingham, UK
View GitHub Profile
.polaroid {
float: left;
position: relative;
width: 200px;
margin: 10px 10px;
padding: 6px 8px 10px 8px;
list-style: none;
-webkit-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
-moz-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
@painejake
painejake / button-demo.css
Created May 20, 2012 11:55
Creating bold, fresh CSS3 buttons with effects
.button, .button:visited { background: #222 url(../img/overlay.png) repeat-x;
display: inline-block;
padding: 5px 10px 6px;
border: 0;
box-shadow: 0 1px 1px #670707,
0 2px 1px #ffffff,
inset 0 1px 0 #e56565;
color: #fff;
text-decoration: none;
text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
@painejake
painejake / gist:2571629
Created May 1, 2012 21:37
Creating a cool smooth CSS3 hover transition effect
#social a {
opacity: 0.4;
filter: alpha(opacity=40)
transition: opacity .50s ease-in-out;
-moz-transition: opacity .50s ease-in-out;
-webkit-transition: opacity .50s ease-in-out;
}
#social a:hover {
opacity: 0.8;
@painejake
painejake / gist:2518535
Created April 28, 2012 12:09
A quick hack
<?php if (function_exists('is_linked_list')) { ?>
<!-- Cool stuff -->
<?php } else { if (!$i++) echo "<h1>No posts?</h1><p>It's ok just grab and install <a href='http://wordpress.org/extend/plugins/daring-fireball-linked-list/'>Daring Fireball-style Linked List</a> plugin!"; } ?>
@painejake
painejake / Program.cs
Created September 3, 2011 10:52
Git Revision with .NET and C#
[AttributeUsage(AttributeTargets.Assembly)]
public class AssemblyGitBuild : Attribute
{
public string gitBuild { get; private set; }
public AssemblyGitBuild(string txt) { gitBuild = txt; }
}
@painejake
painejake / Main.cs
Created March 26, 2011 08:16
Code thats placed in the main form
/// <summary>
/// Code to apply the Aero effect to the Window.
/// Set all the four value -1 to apply glass effect to the whole window
/// Set custom value to make specific part of the window glassy
/// Color.DarkKhaki sets the form Aero trigger due to a bug in VS2010 where some other colors allow click through
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MainForm_Load(object sender, EventArgs e)
{
@painejake
painejake / WindowsAero.cs
Created March 26, 2011 08:12
Windows Aero class example
using System.Runtime.InteropServices;
/// <summary>
/// Code for Windows Aero effects on the Window
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct WindowsAero
{
public int cxLeftWidth;
@painejake
painejake / pst-backup.vbs
Created March 7, 2011 08:52
A simple script to backup Outlook PST's to a network location
Dim FSO
Dim oShell
Set FSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
Set objOutlook = GetObject(, "Outlook.Application")
For Each objInspector In objOutlook.Inspectors
objInspector.CurrentItem.Save
@painejake
painejake / convert_to_lower-case.sh
Created February 22, 2011 11:33
Rename files and folders to lowercase recursively
#!/bin/bash
# Rename all directories. This will need to be done first.
# Process each directory’s contents before the directory itself
find * -depth -type d | while read x
do
# Translate Caps to Small letters
y=$(echo "$x" | tr '[A-Z ]' '[a-z_]');
# create directory if it does not exit
if [ ! -d "$y" ]; then