Skip to content

Instantly share code, notes, and snippets.

View yrezgui's full-sized avatar

Yacine Rezgui yrezgui

View GitHub Profile
@yrezgui
yrezgui / jsonp.js
Created June 29, 2013 15:46 — forked from gf3/jsonp.js
/**
* loadJSONP( url, hollaback [, context] ) -> Null
* - url (String): URL to data resource.
* - hollaback (Function): Function to call when data is successfully loaded,
* it receives one argument: the data.
* - context (Object): Context to invoke the hollaback function in.
*
* Load external data through a JSONP interface.
*
* ### Examples
@yrezgui
yrezgui / gist:6038586
Created July 19, 2013 11:48
Install MEANR stack on Ubuntu
# Install NodeJS
sudo apt-get install python-software-properties python g++ make
sudo apt-add-repository ppa:chris-lea/node.js-legacy
sudo apt-get update
# Check the versions of NodeJS
sudo apt-cache show nodejs
# The last NodeJS version of 0.8 available in the repositery is 0.8.25
sudo apt-get install nodejs=0.8.25-1chl1~raring1
# Install NPM
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE PROCEDURE `createMedic`(OUT newMedicId INT, IN pPassword VARCHAR(100), IN pFirstname VARCHAR(50), IN pLastname VARCHAR(50), IN pBirthdate DATE, IN pEmail VARCHAR(100), IN pGender ENUM('male','female'), IN pService INT, IN pSpeciality INT)
mainJob:BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GovernorHub</title>
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1">
<base href="/">
<link href="http://10.1.2.2:8080/assets/css/ionic-b5b8c208.css" rel="stylesheet">
<link href="http://10.1.2.2:8080/assets/css/ortoo-mobile-67f7332c.css" rel="stylesheet">
var mongodb = require('mongodb');
var client = mongodb.MongoClient;
var request = require('request');
var async = require('async');
var API_JOBS_URL = 'https://api.angel.co/1/jobs';
var MAX_CONCURRENT_WORKERS = 5;
function databaseConnect(callback) {
client.connect('mongodb://127.0.0.1:27017/shigoto', function(error, db) {
db.jobs.aggregate(
{ $match : {
salary_min : {
$gt : 1000,
$lt : 200000
}
}},
{ $project : {
title : 1,
salary_min : 1 ,
@yrezgui
yrezgui / gist:f03543e8f277c6099ccc
Last active August 29, 2015 14:02
Example of crawled page
{
"_id": "https://codio.com/s/blog/2014/03/hiring-more-javascript-engineers/",
"links": [
"https://codio.com/s/blog/2014/06/phonegap-integration-inside-codio/",
"https://codio.com/s/blog/2014/06/ungit/"
],
"assets": {
"images": [
"https://codio.com/s/apple-touch-icon-152x152-precomposed.png"
],
(function () {
'use strict';
var mod = angular.module('components.config', []);
mod.constant('Config', {
BUFFER_API_URL: 'https://api.bufferapp.com/1/',
BUFFER_CLIENT_ID: 'lufhdfkg4b3jkrbriu3hrb23urv3briu3rb3',
CONNECT_URL: 'https://bufferapp.com/oauth2/authorize',
@yrezgui
yrezgui / dashboard.html
Last active August 29, 2015 14:05
dashboard
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
var express = require('express');
var app = express();
app.use(express.static(__dirname + '/public'));
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;