View gist:1037877
This file contains 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
function MyClassA() { | |
console.log('constructor for MyClassA'); | |
this.var1 = "hello"; | |
this.var2 = 2; | |
this.method1 = function() { | |
console.log('calling method1 of MyClassA'); | |
} | |
} | |
View chat-frontend.js
This file contains 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
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
View webgl-demo.dart
This file contains 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
import 'dart:html'; | |
/** | |
* WebGL Demo made in Dart. | |
* Updated: March 11th 2013 - Dart SDK 0.4.1 | |
* This example is heavily inspired by: | |
* http://www.netmagazine.com/tutorials/get-started-webgl-draw-square | |
*/ | |
class WebGLTest { |
View libwebsockets-webserver.c
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <libwebsockets.h> | |
static int callback_http(struct libwebsocket_context *context, | |
struct libwebsocket *wsi, | |
enum libwebsocket_callback_reasons reason, void *user, |
View apd-php54.diff
This file contains 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_apd.c.orig 2004-09-28 05:25:59.000000000 +0200 | |
+++ php_apd.c 2012-08-11 10:59:29.000000000 +0200 | |
@@ -70,7 +70,7 @@ | |
/* List of exported functions. */ | |
-function_entry apd_functions[] = { | |
+zend_function_entry apd_functions[] = { | |
PHP_FE(override_function, NULL) | |
PHP_FE(rename_function, NULL) |
View index.html
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
window.WebSocket = window.WebSocket || window.MozWebSocket; | |
var websocket = new WebSocket('ws://127.0.0.1:9000', |
View parser.php
This file contains 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 | |
$curl = curl_init('http://www.livescore.com/soccer/england/'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10'); | |
$html = curl_exec($curl); | |
curl_close($curl); | |
if (!$html) { |
View RunUnitTests.py
This file contains 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
import os | |
import fnmatch | |
import unittest | |
import webapp2 | |
import importlib | |
from time import clock | |
class RunUnitTests(webapp2.RequestHandler): | |
def get(self): |
View ViewController.mm
This file contains 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
#import "ViewController.h" | |
#import "MapBox.h" | |
@implementation ViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
RMMBTilesSource *offlineSource = [[RMMBTilesSource alloc] initWithTileSetURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"chernarus" ofType:@"mbtiles"]]]; |
View MyCalendar.h
This file contains 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
#import <Foundation/Foundation.h> | |
@interface MyCalendar : NSObject | |
+ (void)requestAccess:(void (^)(BOOL granted, NSError *error))success; | |
+ (BOOL)addEventAt:(NSDate*)eventDate withTitle:(NSString*)title inLocation:(NSString*)location; | |
@end |
OlderNewer