Skip to content

Instantly share code, notes, and snippets.

View Alhamou's full-sized avatar
💭
mein Hobby ist die Entwickle und erstellen komplexe Codes, das ist schönster

Emad Alhamou Alhamou

💭
mein Hobby ist die Entwickle und erstellen komplexe Codes, das ist schönster
View GitHub Profile
@Alhamou
Alhamou / server.js
Last active September 4, 2018 15:20 — forked from tagr/server.js
Node.js/Express: Add Expires header to /images and /stylesheets directories
# set client body size to 20M #
client_max_body_size 20M;
server Block :
location / {
proxy_pass http://167.99.154.190:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@Alhamou
Alhamou / webdev_online_resources.md
Created July 20, 2018 08:23 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
<?php
/**
this is a simple method , which will return soundex of transliterated arabic string
*/
function arSoundex($string)
{
// remove any pounctions and any space etc ..
$string = preg_replace("/\\p{P}|\\p{M}/u", "" , $string);
$chars = array(
"ا"=>"أإاآ" ,
@Alhamou
Alhamou / docker-help.md
Last active March 31, 2019 08:02 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@Alhamou
Alhamou / git_cheat-sheet.md
Created March 22, 2019 10:29 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@Alhamou
Alhamou / index.js
Last active March 30, 2023 05:11 — forked from cafeasp/index.js
google drive api Node js - Quickstart
const fs = require('fs');
const readline = require('readline');
const { google } = require('googleapis');
//Drive API, v3
//https://www.googleapis.com/auth/drive See, edit, create, and delete all of your Google Drive files
//https://www.googleapis.com/auth/drive.file View and manage Google Drive files and folders that you have opened or created with this app
//https://www.googleapis.com/auth/drive.metadata.readonly View metadata for files in your Google Drive
//https://www.googleapis.com/auth/drive.photos.readonly View the photos, videos and albums in your Google Photos
//https://www.googleapis.com/auth/drive.readonly See and download all your Google Drive files
// If modifying these scopes, delete token.json.
@Alhamou
Alhamou / get-comments.js
Created June 14, 2022 12:36 — forked from mikeal/get-comments.js
The easiest way to get comments out of any code file... seriously?!?
var highlight = require('highlight.js')
var cheerio = require('cheerio')
var strip = ['/', '#', ' ', '*', "<", ">", '-', '\\']
function getComments (str) {
var html = highlight.highlightAuto(str).value
var $ = cheerio.load(html)
var lines = $('span.hljs-comment').map(function(i, el) {return $(this).text();}).get()
return lines.map(function (l) {
import { MeshWriter } from "meshwriter";
const canvas = document.getElementById("renderCanvas"); // Get the canvas element
const engine = new BABYLON.Engine(canvas, true); // Generate the BABYLON 3D engine
const createScene = function () {
const scene = new BABYLON.Scene(engine);
const camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 2, Math.PI / 4, 50, BABYLON.Vector3.Zero(), scene);
const light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 10, 0), scene);