Skip to content

Instantly share code, notes, and snippets.


Hamza Mousa hamzamu

View GitHub Profile
hamzamu /
Created Aug 21, 2020 — forked from lmcneel/
How to remove node_modules after they have been added to a repo

How to remove node_modules

  1. Create a .gitignore file in the git repository if it does not contain one

touch .gitignore 2. Open up the .gitignore and add the following line to the file

node_modules 3. Remove the node_modules folder from the git repository

hamzamu / bulma.js
Created Jul 23, 2020
Bulma Clanedar
View bulma.js
var options = {
type: data.type || 'date',
minDate: new Date(),
// displayMode:'dialog',
showHeader: false,
// maxDate: '2018-12-31',
// dateFormat: 'yyyy-mm-dd',
isRange: false,
// showTodayButton: true,
// enableYearSwitch: true
hamzamu / server.js
Created Jun 21, 2020
Meteor Picker API: Upload files thru REST API.
View server.js
import {
} from 'meteor/webapp'
import bodyParser from 'body-parser'
const fs = require('fs');
const fse = require('fs-extra')
const path = require('path');
const multer = require('multer');
hamzamu / simple_rsa
Last active Jun 21, 2020 — forked from chj1768/simple_rsa
RSA encryption / decryption example (nodejs) & Meteor
View simple_rsa
openssl key pair generate
//client - using meteor.js
const nodersa = Npm.require('node-rsa');
import { HTTP } from 'meteor/http';
const syncPost = Meteor.wrapAsync(, HTTP );
encryptStringWithRsaPublicKey( data ) {
const absolutePath = Assets.absoluteFilePath( "public.key" ); //public key file path
const publicKey = fs.readFileSync( absolutePath, "utf8" );
hamzamu /
Created Jun 14, 2020 — forked from subfuzion/
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

hamzamu / imap-search
Created Jun 13, 2020 — forked from martinrusev/imap-search
IMAP Search criteria
View imap-search
hamzamu /
Created Apr 26, 2020 — forked from ErisDS/
Ghost Filter Query examples

Filter Queries - Example Use Cases

Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)

Fetch 3 posts with tags which match 'photo' or 'video' and aren't the post with id 5.

api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});

GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3

hamzamu /
Created Apr 22, 2020 — forked from runbrun/
bash script to create nginx virtual hosts
#!/usr/bin/env bash
# Nginx - new server block
read -p "Enter username : " username
read -p "Enter domain name : " domain
# Functions
ok() { echo -e '\e[32m'$domain'\e[m'; } # Green
die() { echo -e '\e[1;31m'$domain'\e[m'; exit 1; }
hamzamu / client.js
Created Apr 20, 2020
Meteor- browser console stats snippet
View client.js
getStats = function () {'getStats', null, (err, data) => {
if (data) {
stats: data
return "Getting Statistics"
hamzamu /
Created Mar 23, 2020 — forked from olasd/
Stream video to youtube via ffmpeg
#! /bin/bash
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://" # URL de base RTMP youtube
You can’t perform that action at this time.