Skip to content

Instantly share code, notes, and snippets.

View EddieRingle's full-sized avatar

Eddie Ringle EddieRingle

View GitHub Profile
function get_first_image($html)
{
// We're trying to find and retrieve the SRC of the first image tag in the content
preg_match("/<img(.*)>/Uise", $html, $matches);
if(@trim($matches[1]) !== "")
{
// Found an image tag!
// Get the SRC parameter ...
preg_match("/src=\"(.*)\"/Uise", $matches[1], $image);
test gist
A lot
more
lines
than
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 2a695e5..c38ffe6 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -210,7 +210,7 @@ public class ProgressBar extends View {
drawable = a.getDrawable(R.styleable.ProgressBar_indeterminateDrawable);
if (drawable != null) {
- drawable = tileifyIndeterminate(drawable);
+ //drawable = tileifyIndeterminate(drawable);
Test 1
Modifying this gist.
@EddieRingle
EddieRingle / entity.h
Created July 18, 2011 21:47
Cerberus Entity class header
/*
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@EddieRingle
EddieRingle / update
Created August 18, 2011 21:37
All-in-one script for system maintenance via APT
#!/bin/sh
#
# All-in-one script for system maintenence via APT
#
# sudo wget http://files.idlesoft.net/pub/update -O /usr/local/sbin/update
# sudo chmod a+x /usr/local/sbin/update
#
echo ".::Updating sources::."
apt-get update
@EddieRingle
EddieRingle / llist.c
Created October 23, 2011 15:50
A Neat LList Implementation
/*
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@EddieRingle
EddieRingle / darray.c
Created October 23, 2011 21:46
A Neat DArray Implementation
/*
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@EddieRingle
EddieRingle / hashtable.c
Created October 28, 2011 02:18
A Neat HashTable Implementation
/*
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
###
UI Element classes
Written by Eddie Ringle
###
class Button extends HTMLButtonElement
constructor: (@className, value) ->
@innerHTML = value
setValue: (value) ->