Skip to content

Instantly share code, notes, and snippets.

Esfand esfand

Block or report user

Report or block esfand

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@esfand
esfand / install.py
Created May 28, 2018 — forked from ajumell/install.py
Webfaction Magento Insatll script.
View install.py
-----BEGIN WEBFACTION INSTALL SCRIPT-----
#!/bin/env python2.4
"""
Magento 1.7.0.2
"autostart": not applicable
"extra info": Do you agree to Magento's license?
http://www.opensource.org/licenses/osl-3.0.php
@esfand
esfand / RIOServer_sm9.cpp
Created Feb 26, 2018 — forked from ujentus/RIOServer_sm9.cpp
Windows Registered I/O (RIO) Sample Code (Echo Server)
View RIOServer_sm9.cpp
/*********************************************************************************************************
* Windows Registered I/O (RIO) Sample Code (Echo Server)
* Minimum requirement: Windows 8 or Windows Server 2012
* Author: @sm9kr
*
* Notice
* 몇몇 코드 조각들은 (http://www.serverframework.com/asynchronousevents/rio/)에서 가져옴.
* 그런데 여기도 제대로 완성된 코드가 있었던 것은 아니라서 상당 부분 기능을 추가하여 동작하도록 함.
* RIO의 사용법을 보여주기 위한 코드라 최대한 간단하게 필요한 부분만 넣었음.
* 그래서, 버그가 있을 수 있음...
@esfand
esfand / TwitterStream.cpp
Created Jan 26, 2018 — forked from komasaru/TwitterStream.cpp
C++ source code to get twitter timelines by Twitter Streaming API.
View TwitterStream.cpp
/*
* Getting timelines by Twitter Streaming API
*/
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <oauth.h>
#include <curl/curl.h>
@esfand
esfand / nginx-apache-reverse-proxy-wordpress-mu-vhost.conf Useful nginx virtual host configuration for reverse proxy (proxy_pass) with Apache
View nginx-apache-reverse-proxy-wordpress-mu-vhost.conf
# useful nginx configuration for reverse proxy with Apache
# edit lines 8, 11, and 30
# taken from: http://syslog.tv/2010/01/11/debian-apache-2-nginx-wordpress-mu/
# edits by jakebellacera (http://github.com/jakebellacera && http://jakebellacera.com)
server {
listen 80;
server_name domain.com *.domain.com; # edit this to your domain
@esfand
esfand / OAuth1.java
Created Oct 31, 2017 — forked from khris/OAuth1.java
Alternative OAuth 1 implements for Twitter's hbc. It's compatible with joauth 6.0.+ so independent from Scala.
View OAuth1.java
/**
* Original: https://github.com/twitter/hbc/blob/master/hbc-core/src/main/java/com/twitter/hbc/httpclient/auth/OAuth1.java
*
* It is compatible with scala-less joauth 6.0.+, but hbc is not
* compatible with Android. #EpicFail
*
* Licensed under the Apache License, Version 2.0 (the "License");
**/
/**
@esfand
esfand / background.js
Created Oct 16, 2017 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
View background.js
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@esfand
esfand / stream.py
Created Jun 25, 2017 — forked from messa/stream.py
Twitter Streaming API example
View stream.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import json
import oauth2 # https://raw.github.com/brosner/python-oauth2/master/oauth2/__init__.py
from pprint import pprint
import urllib2
stream_url = "https://stream.twitter.com/1/statuses/filter.json"
View hero.ts
export class Hero {
private _id: number;
private _name: string;
private _power: string
private _alterEgo: string
constructor(
public id: number,
public name: string,
public power: string,
View TypeScriptResolver.md

Typings for npm packages

https://github.com/Microsoft/TypeScript.wiki.git

TypeScript 1.6 has introduced new way of resolving module names that mimics the Node.js module resolution algorithm. This means the TypeScript compiler can currently load typings that are bundled with npm packages.

The compiler will try to discover typings for module "foo" using the following set of rules:

@esfand
esfand / even.js
Created Nov 19, 2015 — forked from fson/even.js
Mutually recursive modules
View even.js
import odd from './odd';
export default function even(n) {
if (n === 0) {
return true;
}
return !odd(n - 1);
}
You can’t perform that action at this time.