Skip to content

Instantly share code, notes, and snippets.

@sayar
sayar / gist:5832606
Created June 21, 2013 16:54
wporg example
var wp = require('wporg');
var client = wp.createClient({
username: "username",
password: "password",
url: "http://example.com/xmlrpc.php"
});
client.getUsersBlogs(function(err, data){
if(err){
@sayar
sayar / memory_leak.html
Created September 16, 2015 14:09
FITC - Advanced JavaScript Debugging
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Memory Leak</title>
<meta name="author" content="@ramisayar">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
@sayar
sayar / app.js
Last active August 29, 2015 14:19
FITC - What's New in ES6 for Web Devs - Sample code from my presentation
'use strict';
// app.js
import * as math from "math";
alert("2π = " + math.add(math.pi, math.pi));
@sayar
sayar / server.js
Created March 22, 2015 18:04
Hands-on: Build a Node.js-powered chatroom web app | Part 1: Introduction to Node.js
var http = require('http');
var port = process.env.port || 1337;
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port);