Skip to content

Instantly share code, notes, and snippets.

View minhajuddin's full-sized avatar
⌨️
Beep boop, beep boop

Khaja Minhajuddin minhajuddin

⌨️
Beep boop, beep boop
View GitHub Profile
@minhajuddin
minhajuddin / HelloWorld.cs
Created April 29, 2009 06:31
Simple Hello World code in C#
using System;
public class HW{
public static void Main(){
Console.WriteLine("Hello, World!");
}
}
@minhajuddin
minhajuddin / linq.js
Created September 27, 2009 05:59 — forked from nkohari/linq.js
/*
linq.js -- a simple LINQ implementation for javascript
Author: Nate Kohari <nate@enkari.com>
Copyright (C) 2009 Enkari, Ltd.
Released under the Apache 2.0 license (http://www.opensource.org/licenses/apache2.0.php)
*/
Array.prototype.all = function(func) {
var result = true;
this.iterate(function(item) {
"necessary for lots of cool vim things
let mapleader=","
set nocompatible
" This shows what you are typing as a command. I love this!
set showcmd
" Folding Stuffs
set foldmethod=marker
" Needed for Syntax Highlighting and stuff
<html>
<head>
<style type='text/css'>
ol, ul {
list-style-image: none;
list-style-position: outside;
list-style-type: none;
}
li { display:inline; }
li a{
<UserSettings>
<ApplicationIdentity version="9.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment">
<ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package">
<PropertyValue name="ShowMiscFilesProject">false</PropertyValue>
<PropertyValue name="AutoloadExternalChanges">false</PropertyValue>
<PropertyValue name="CheckForConsistentLineEndings">true</PropertyValue>
<PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue>
<PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue>
UI/*Publish.xml
Logs
App_Data
obj
bin
WorkingTemp
deploy
deploy/*
_ReSharper.*
*.csproj.user
declare @foo xml
select @foo='<ext><name><first>Khaja</first><last>Minhajuddin</last></name><age>25</age></ext>';
select @foo.value('(//ext/name/first)[1]','varchar(50)') 'First Name',
@foo.value('(//ext/name/last)[1]','varchar(50)') 'Last Name',
@foo.value('(//ext/age)[1]','integer') 'Age';
#!/usr/bin/env ruby
# Script to create a jekyll blog post using a template. It takes one input parameter
# which is the title of the blog post
# e.g. command:
# $ ./new.rb "helper script to create new posts using jekyll"
#
# Author:Khaja Minhajuddin (http://minhajuddin.com)
# Some constants
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
rails_env = ENV['RAILS_ENV'] || 'production'
# 16 workers and 1 master
worker_processes (rails_env == 'production' ? 16 : 4)
# Load rails+github.git into the master before forking workers
# for super-fast worker spawn times
preload_app true
@minhajuddin
minhajuddin / nginx.configure.sh
Created November 4, 2010 09:47
nginx configure script
#pcre libraries
sudo apt-get install libpcre3 libpcre3-dev
#configure options
./configure \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/body \