Skip to content

Instantly share code, notes, and snippets.

@pushmon
pushmon / gist:1886446
Created February 22, 2012 18:16
Ruby
require 'net/http'
require 'uri'
urlString = 'http://pshmn.com/eaFnY'
begin
Net::HTTP.get(URI.parse(urlString))
rescue
# log error
end
@pushmon
pushmon / gist:1886456
Created February 22, 2012 18:18
JavaScript
<script type='text/javascript' src="http://pshmn.com/eaFnY?type=js"></script>
<?php
$urlString = 'http://pshmn.com/eaFnY';
$handle = @fopen($urlString, 'r');
if (!$handle) {
// log error
}
@fclose($handle);
?>
<project name="urlping" default="urlping" basedir=".">
<target name="urlping">
<get src="http://pshmn.com/eaFnY" dest="./~pushmon.tmp" />
</target>
</project>
@pushmon
pushmon / gist:1886151
Created February 22, 2012 17:18
AutoIt
Dim $urlString = "http://pshmn.com/eaFnY";
InetGet($urlString, "~ping.tmp")
If @error <> 0 Then
; log error
EndIf
@pushmon
pushmon / c
Created April 2, 2014 14:39
C Language
<#if filename>
c_.txt
<#elseif title>
C
<#elseif logo>
//dmnv44fd3imdv.cloudfront.net/www.pushmon.com/img/code/java.gif
<#elseif code>
#include <stdio.h>
#include <curl.h>
@pushmon
pushmon / node
Created April 2, 2014 14:44
Node
<#if filename>
node_.txt
<#elseif title>
Node
<#elseif logo>
@pushmon
pushmon / scala
Last active August 29, 2015 13:58
Scala
<#if filename>
scala_.txt
<#elseif title>
Scala
<#elseif logo>
//dmnv44fd3imdv.cloudfront.net/www.pushmon.com/img/code/java.gif
<#elseif code>
package com.teamextension.ping;
import java.net.URL