Skip to content

Instantly share code, notes, and snippets.

View jalchr's full-sized avatar

Jalal EL-SHAER jalchr

  • EdenGate
View GitHub Profile
@mattwarren
mattwarren / gist:1214297
Created September 13, 2011 16:53
Faceted search SO example
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using Raven.Abstractions.Data;
using Raven.Abstractions.Indexing;
using Raven.Client;
using Raven.Client.Linq;
@mattwarren
mattwarren / gist:1265715
Created October 5, 2011 20:59
Facets and analyzed test
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using Raven.Abstractions.Data;
using Raven.Abstractions.Indexing;
using Raven.Client;
using Raven.Client.Linq;
using Raven.Client.Indexes;
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@JamesRandall
JamesRandall / BlobStorageMultipartStreamProvider.cs
Last active March 19, 2020 23:12
Azure Blob Container Web API Image Upload
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
@brock
brock / nodereinstall.sh
Last active June 13, 2024 12:20
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@adamreisnz
adamreisnz / duplicateRequestsFilter.js
Last active September 17, 2018 12:10
An AngularJS $http decorator to filter duplicate requests (now released as library: https://github.com/meanie/angular-duplicate-requests-filter)
/**
* Module definition and dependencies
*/
angular.module('Api.DuplicateRequestsFilter.Decorator', [])
/**
* Config
*/
.config(function($provide) {
@marcelo-ribeiro
marcelo-ribeiro / javascript-remove-accents.js
Last active May 21, 2023 09:17 — forked from fabiofdsantos/angularJS_removeAccents.js
An Javascript function to remove accents and others characters from an input string.
// Example: https://codepen.io/marcelo-ribeiro/pen/OJmVOyW
const accentsMap = new Map([
["A", "Á|À|Ã|Â|Ä"],
["a", "á|à|ã|â|ä"],
["E", "É|È|Ê|Ë"],
["e", "é|è|ê|ë"],
["I", "Í|Ì|Î|Ï"],
["i", "í|ì|î|ï"],
["O", "Ó|Ò|Ô|Õ|Ö"],
@hanhdt
hanhdt / 01_elastic_beanstalk_install_packages.config
Last active August 15, 2023 17:00
Setup additional linux packages on AWS Elastic Beanstalk that need to build Rails 5
# Setup linux packages
option_settings:
- option_name: BUNDLE_DISABLE_SHARED_GEMS
value: "1"
- option_name: BUNDLE_PATH
value: "vendor/bundle"
packages:
yum:
curl: []
@danparker276
danparker276 / Expo_Push_Notifications_Helper.cs
Created August 17, 2018 22:38 — forked from rbravo/Expo_Push_Notifications_Helper.cs
Expo.io Push Notifications Send Through C#
public class ExpoPushHelper
{
public class MyWebClient : WebClient
{
protected override WebRequest GetWebRequest(Uri address)
{
HttpWebRequest request = base.GetWebRequest(address) as HttpWebRequest;
request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
return request;
}