Skip to content

Instantly share code, notes, and snippets.


Daniel Lo Nigro Daniel15

View GitHub Profile
View 1_Twitter autoresponder

Twitter autoresponder bot

By Daniel15 ( This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.

Could be modified to be more advanced (match regular expressions to answer questions, etc.)

Questions? See my blog post -

Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1

Daniel15 /
Created Oct 3, 2011
ASP.NET Server Info page

Simple ASP.NET server info page. Shows uptime, hard drive space, and RAM.

Add this to Web.config system.web -> configuration -> assemblies:

Daniel15 / GtkDimScreen.cs
Created Nov 21, 2011
Semi-transparent window in GTK# (Mono, C#)
View GtkDimScreen.cs
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Cairo;
using Gtk;
public class GtkDimScreen
private DrawingArea drawingArea;
Daniel15 / gist:1709107
Created Jan 31, 2012
Get content of currently executing page (ASP / VBScript)
View gist:1709107
Dim sPath
Dim oFS
Dim oTextStream
Dim sFile
sPath = Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oTextStream = oFS.OpenTextFile(sPath, 1)
sFile = oTextStream.ReadAll()
Set oFS = Nothing
Daniel15 / dabblet.css
Created Mar 6, 2012
Telstra buttons example
View dabblet.css
border: 0;
padding: 0 0 0 30px;
margin: 0;
background: white url( no-repeat;
height: 25px;
line-height: 25px;
cursor: pointer;
color: #003366;
View gist:2271700
root@lisa:/# /etc/init.d/php5-fpm restart
Restarting PHP5 FastCGI Process Manager: php5-fpm*** glibc detected *** /usr/sbin/php5-fpm: free(): invalid pointer: 0xb6d860f0 ***
======= Backtrace: =========
======= Memory map: ========
08048000-08710000 r-xp 00000000 08:01 11403530 /usr/sbin/php5-fpm
08710000-08771000 r-xp 006c7000 08:01 11403530 /usr/sbin/php5-fpm
Daniel15 / gist:2549243
Created Apr 29, 2012
LESS mixin for RGBA colours in IE
View gist:2549243
// Use with colour name: .rgba(black, 0.5) or hex value: .rgba(#FF2400, 0.5)
.rgba(@colour, @alpha)
@alphaColour: hsla(hue(@colour), saturation(@colour), lightness(@colour), @alpha);
@ieAlphaColour: argb(@alphaColour);
background-color: @colour; // Fallback for older browsers
background-color: @alphaColour;
// IE hacks
Daniel15 / gist:2826819
Created May 29, 2012
Internet Explorer's console.log is not actually a function.
View gist:2826819
>> document.getElementById
function getElementById() { [native code] }
>> document.getElementById instanceof Function
>> document.getElementById.apply
function apply() { [native code] }
>> typeof(document.getElementById)
>> console.log
function log() { [native code] }
Daniel15 / gist:3074365
Created Jul 9, 2012
Validating JSONP callback function name in C#
View gist:3074365
/// <summary>
/// Validation of JSONP callback function names
/// </summary>
/// <remarks>
/// Based off the PHP code at, which is originally based off
/// a blog post at
/// </remarks>
public class JsonValidator
/// <summary>