Skip to content

Instantly share code, notes, and snippets.

View kzelda's full-sized avatar
😄
الحمد لله

kzelda

😄
الحمد لله
View GitHub Profile
@kzelda
kzelda / elbilad.net.monkey.user.js
Created September 5, 2016 13:18 — forked from boubkhaled/elbilad.net.monkey.user.js
Enable text selection
// ==UserScript==
// @name elbilad.net
// @namespace MyScripts
// @description Autoriser la sélection du text
// @include http://www.elbilad.net/*
// @version 1
// @grant none
// ==/UserScript==
$("#contenu *").css("-moz-user-select","text");
@kzelda
kzelda / nodejs-node-symlink.sh
Created November 12, 2016 10:43
Ubuntu : create a symlink of nodejs ~ node
@kzelda
kzelda / VS Code Add jquery support
Created November 13, 2016 09:06
VSCode jquery solution.txt
Create folder : typings/jquery
Save to this folder : https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/jquery/jquery.d.ts
Add first line of file.js : /// <reference path="typings/jquery/jquery.d.ts" />
source : http://stackoverflow.com/questions/29970278/visual-studio-code-jquery-suggestion
If the light bulb doesn't appear, you can add the type definitions manually:
Create typings\jquery folder structure within your project folder (if not exist)*
@kzelda
kzelda / README.md
Created November 13, 2016 09:39 — forked from joyrexus/README.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

@kzelda
kzelda / curl.md
Created November 13, 2016 09:53 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@kzelda
kzelda / kzelda.blog.ai3.fr.user.js
Created December 5, 2016 10:11
tampermonkey / GreaseMonkey
// ==UserScript==
// @name blog.ai3.fr
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Remove right panel , for good reading
// @author k
// @match https://blog.ai3.fr/*
// @grant none
// ==/UserScript==
@kzelda
kzelda / server_tour_of_heroes.js
Created April 5, 2017 13:04
Back end server Of Tour Of Heroes
var express = require('express'); //npm install --save express
var bodyParser = require('body-parser'); //npm install --save body-parser
var app = express();
// Heroes --------------------------------
var HEROES ={data : [
{ id: 11, name: 'Mr. Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
@kzelda
kzelda / web.config
Last active May 18, 2017 09:00
Cors Web.config
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>
</system.webServer>
@kzelda
kzelda / Angular.rewrite.Web.config
Created May 18, 2017 09:25
Web.config Angular rewrite
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AngularJS Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
@kzelda
kzelda / F_SPLIT.sql
Last active August 24, 2017 10:07
TSQL Function to Split a string And return an array Of splitted elements
/*
select * from F_SPLIT ('D2177CF0-36E0-45DB-8C4F-D47448EF7EB0,33ECA429-6AB9-4BBA-947E-5DF747E5F559' , ',' )
*/
CREATE FUNCTION F_SPLIT ( @tcList VARCHAR(8000) , @tcDelimiter char(1) = ',')
RETURNS @ParsedList TABLE ( idd INT IDENTITY , element VARCHAR(MAX) )
AS
BEGIN