Skip to content

Instantly share code, notes, and snippets.

View arbaaz's full-sized avatar
🔥
Building an amazing product

Arbaaz arbaaz

🔥
Building an amazing product
View GitHub Profile
@arbaaz
arbaaz / js_var.php
Created February 12, 2014 18:23
passing variable to javascript
passing a php variable to the javascript
<?php
$phpdata=array('key1'=>'some value','key2'=>'another value');
$jsondata=json_encode($phpdata);
echo "var mydata=".$jsondata.";";
?>
This will give you javascript that looks like this:
@arbaaz
arbaaz / ie.html
Created March 14, 2014 13:08
IE_conditional_tag
<!--[if (gte mso 9)|(IE)]>
<table width="425" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
This is conditional tag for IE rendering engine
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
@arbaaz
arbaaz / email_lite.html
Created March 20, 2014 08:42
Email Broiler plate
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Your Message Subject or Title</title>
<style type="text/css">
/* Based on The MailChimp Reset INLINE: Yes. */
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
@arbaaz
arbaaz / csvtoTable
Last active August 29, 2015 14:03
CSV to Table Function
/****** Object: UserDefinedFunction [dbo].[CSVToTable] Script Date: 06/29/2014 12:40:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[CSVToTable] (@InStr VARCHAR(MAX))
RETURNS @TempTab TABLE
(ContainerNumber varchar(max) not null)
AS
@arbaaz
arbaaz / xmltodb.cs
Created July 9, 2014 06:44
Applying xslt on xml and storing in database
using System.Data;
using System.IO;
using System.Xml;
using System.Xml.Xsl;
namespace xmltodb
{
internal static class Program
{
@arbaaz
arbaaz / filewatcher.cs
Created July 13, 2014 15:12
C# filewatcher
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace FileWatcher
{
@arbaaz
arbaaz / server.js
Created July 13, 2014 15:31
create a node server saying hello world
var http= require('http');
http.createServer(function(req,res){
res.writeHead(200,{'Content-Type':'text/plain'});
res.write("hey awesome boy\n");
res.end('hello world');
}).listen(1337,'127.0.0.1');
console.log('server running at http://127.0.0.1:1337/');
(sqrt(​cos(​x))*​cos(​200*​x)+​sqrt(​abs(​x))-​0.7)*​(4-​x*​x)^​0.01, (x-​2.9)^​2-​1, (‑(4*​x))-​7, (‑(4*​x))-​7.1
@arbaaz
arbaaz / ConsoleClosed
Created August 21, 2014 06:52
When the Console Is Closed
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace TestTrapCtrlC
{
public class Program
@arbaaz
arbaaz / fib.py
Created August 29, 2014 06:58
Smallest Fibnocci code in python
def fib(n):
a,b=0,1
while a<n:
print a,
a,b=b,a+b
fib(20000000)