Skip to content

Instantly share code, notes, and snippets.

View jalalhejazi's full-sized avatar
:copilot:
DevOps Automation

Jalal Hejazi jalalhejazi

:copilot:
DevOps Automation
View GitHub Profile
using ServiceStack.Common;
using ServiceStack.OrmLite;
using ServiceStack.ServiceInterface;
using ServiceStack.ServiceInterface.Auth;
using ServiceStack.WebHost.Endpoints;
using System;
using System.Data;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using ServiceStack.WebHost.Endpoints;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security;
using ServiceStack.Common.Web;
using ServiceStack.Logging;
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
We couldn’t find that file to show.
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql
@jalalhejazi
jalalhejazi / ajax_with_jsonp.html
Created March 3, 2014 13:27
Kasper: CORS med JSONP
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ajax with JSONP</title>
</head>
<body>
<section data-til="Kasper">
Dette er eksempel på ajax with padding (jsonP). <br>
@jalalhejazi
jalalhejazi / DAL_repository.js
Created February 28, 2014 13:07
node: DAL Repository prototype Module
// http://node.supermobile.dk/rest-api-repository-design-pattern/
// DataAccessLayer Repository Pattern
// using nodejs, express and javascript prototype
// exported as module
module.exports = TaskRepository;
//TaskRepository class Constructor
function TaskRepository() {
this.tasks = [{
// DataAccessLayer Repository Pattern
// using nodejs, express and javascript prototype
/**
* TaskRepository class deals with task persistence
*/
function TaskRepository() {
this.tasks = [];
this.nextId = 1;
@jalalhejazi
jalalhejazi / jQuery.plugin.flash.html
Last active August 29, 2015 13:56
jQuery.plugin: flash() with extend
<!doctype html>
<html>
<head>
<meta charset=utf-8>    
<title>Create Custom Effect</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">    
<style>
p {
@jalalhejazi
jalalhejazi / web-server.js
Created January 25, 2014 18:33
node: WebServer support HTTP-GET and HTTP-POST (index.html as default)
/*=======================================================================
= Node Simple HTTP-WebServer by Jalal Hejazi 2014 =
=======================================================================*/
var util = require('util'),
http = require('http'),
fs = require('fs'),
url = require('url'),
events = require('events');