Skip to content

Instantly share code, notes, and snippets.

View ZakiMohammed's full-sized avatar
🎨
Painting

Zaki Mohammed ZakiMohammed

🎨
Painting
View GitHub Profile
@ZakiMohammed
ZakiMohammed / BloomFilter.cs
Created August 15, 2016 15:12 — forked from richardkundl/BloomFilter.cs
Bloom filter implementation in c#.
namespace BloomFilter
{
using System;
using System.Collections;
/// <summary>
/// Bloom filter.
/// </summary>
/// <typeparam name="T">Item type </typeparam>
public class Filter<T>
@ZakiMohammed
ZakiMohammed / Default.aspx
Last active March 27, 2019 06:29
Export To Excel/CSV C#
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="foo_excel.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
@ZakiMohammed
ZakiMohammed / Git Hub API.txt
Last active April 8, 2019 09:16
Git Hub API
api: https://api.github.com
user: https://api.github.com/user/14352669
repos: https://api.github.com/users/ZakiMohammed/repos
gists: https://api.github.com/users/ZakiMohammed/gists
@ZakiMohammed
ZakiMohammed / HeroicData.cs
Last active April 20, 2019 10:15
Heroic ADO.NET based data access layer for C#
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Configuration;
namespace HeroicAccess
{
public class HeroicData
@ZakiMohammed
ZakiMohammed / index.php
Last active May 31, 2019 06:50
PHP MCrypt library in action
<?php
require_once('mcrypt.php');
$encryptedText = '';
$decryptedText = '';
$txtPlainText = '';
$txtEncryptedText = '';
@ZakiMohammed
ZakiMohammed / empty_isset.php
Last active February 2, 2020 09:06
PHP Empty vs Isset
<?php
class Person {
private $age, $name, $gender;
function __construct($name, $gender, $age){
$this->name = $name;
$this->gender = $gender;
$this->age = $age;
}
@ZakiMohammed
ZakiMohammed / myscript.php
Created July 23, 2019 04:11
Creating a PHP bash file
#!/usr/bin/php
<?php
echo 'Hello World';
?>
@ZakiMohammed
ZakiMohammed / angular-file-saver.bundle.min.js
Last active October 16, 2019 06:33
AngularJS File Download
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";t.exports="ngFileSaver",angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",n(1)]).factory("FileSaverUtils",[n(2)]).factory("Blob",["$window",n(3)]).factory("SaveAs",[n(5)])},function(t,e){"use strict";t.exports=function(t,e,n){function o(t,o,r){try{e(t,o,r)}catch(i){n.handleErrors(i.message)}}return{saveAs:function(t,e,r){return n.isBlobInstance(t)||n.handleErrors("Data argument should be a blob instance"),n.isString(e)||n.handleErrors("Filename argument should be a string"),o(t,e,r)}}}},function(t,e){"use st
@ZakiMohammed
ZakiMohammed / note.txt
Last active October 16, 2019 08:37
Download file with new tab
References:
For reading query string:
https://stackoverflow.com/questions/9870512/how-to-obtain-the-query-string-from-the-current-url-with-javascript
For downloading file on new tab:
https://stackoverflow.com/questions/1066452/easiest-way-to-open-a-download-window-without-navigating-away-from-the-page
@ZakiMohammed
ZakiMohammed / material-file-upload.component.css
Created December 17, 2019 13:21
Material File Upload Component Example
ul,
li {
margin: 0;
padding: 0;
list-style: none;
}
#file-label {
display: inline-flex;
vertical-align: middle;