This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// strip multiline comment | |
.replace(/\/\*((?:[^\*]|\*[^\/])*)\*\//g, '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf8 -*- | |
# | |
# Simple WebSockets in Python | |
# By Håvard Gulldahl <[email protected]> | |
# | |
# Based on example by David Arthur (he did all the hard work :) | |
# https://gist.github.com/512987 | |
# | |
import struct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
public class wget | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert to relative date | |
* | |
* @param int $timestamp In seconds | |
* @param array $settings | |
* @param string $default_format | |
* @return string | |
* @version 1.0 (2011-12-12) | |
*/ | |
function relative_date( $timestamp, array $settings = array(), $default_format = 'Y-m-d' ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
// Made By Han Lin Yap 2011-03-03 | |
public class screen_capture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ======================================================== | |
* bootstrap-tab.js v2.0.1 modified r1 | |
* http://twitter.github.com/bootstrap/javascript.html#tabs | |
* ======================================================== | |
* Copyright 2012 Twitter, Inc. | |
* | |
* 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 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var queue = 0; | |
var last_index = 0; | |
jQuery(function ($) { | |
$(document).on('click', '#splash .left a', function () { | |
show_splash(--last_index); | |
return false; | |
}); | |
$(document).on('click', '#splash .right a', function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$username = 'clXXXXX'; | |
$password = ''; | |
$base_url = 'https://api.glesys.com'; | |
$param = '/server/list/format/json/'; | |
$context = stream_context_create(array( | |
'http' => array( | |
'header' => "Authorization: Basic " . base64_encode("$username:$password") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove any non-ASCII characters and convert known non-ASCII characters | |
* to their ASCII equivalents, if possible. | |
* | |
* @param string $string | |
* @return string $string | |
* @author Jay Williams <myd3.com> | |
* @license MIT License | |
* @link http://gist.github.com/119517 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Han Lin Yap < http://zencodez.net/ > | |
* @copyright 2012 zencodez.net | |
* @license http://creativecommons.org/licenses/by-sa/3.0/ | |
* @package proxy | |
* @version 1.0 - 2012-05-01 | |
*/ | |
$method = $_SERVER['REQUEST_METHOD']; | |
$request = substr($_SERVER['PATH_INFO'], 1); |
OlderNewer