Skip to content

Instantly share code, notes, and snippets.

View moughamir's full-sized avatar
:shipit:
Inspecting elements

Mohamed Moughamir moughamir

:shipit:
Inspecting elements
View GitHub Profile
@moughamir
moughamir / index.html
Created July 19, 2023 17:21
Responsive Resume Template
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<div class="resume-wrapper">
<section class="profile section-padding">
<div class="container">
<div class="picture-resume-wrapper">
<div class="picture-resume">
<span><img src="https://s3.amazonaws.com/uifaces/faces/twitter/jsa/128.jpg" alt="" /></span>
<svg version="1.1" viewBox="0 0 350 350">
<defs>

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@moughamir
moughamir / bodymovin-test.markdown
Created February 19, 2021 14:03
Bodymovin Test
@moughamir
moughamir / sw.js
Created February 6, 2021 23:55
sw
"use strict";
/**
* Service Worker of MoNetWork
*/
const cacheName = "m.monetwork.ma";
const startPage = "https://m.monetwork.ma";
const offlinePage = "https://m.monetwork.ma";
const filesToCache = [startPage, offlinePage];
@moughamir
moughamir / button.html
Last active February 6, 2021 22:50
pwa-install-promt.js
<div class="prompt">
<p>Install the app in your device</p>
<button type="button" class="prompt__install">Yes Please</button>
<button type="button" class="prompt__close">No Thanks</button>
</div>
<style>
.prompt {
display: none;
}
</style>
@moughamir
moughamir / reclaimWindows10.ps1
Created July 22, 2020 02:33 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@moughamir
moughamir / pre-commit
Created June 17, 2020 16:15 — forked from gsmendoza/pre-commit
Git pre-commit hook for image optimization.
#!/usr/bin/env ruby
require 'image_optim'
staged_files = `git diff --cached --name-only --diff-filter=ACM`.split("\n")
staged_files.select! { |f| f =~ %r{/images/} }
if staged_files.any?
image_optim = ImageOptim.new(pngout: false)
@moughamir
moughamir / sign.js
Created July 29, 2019 19:30 — forked from ajinabraham/sign.js
Node.js Digital Signature - Sign
//Create Private Key with OpenSSL
//openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -pkeyopt rsa_keygen_pubexp:3 -out privateKey.pem
//Generate Public Key to be used at the client side (Mobile)
//openssl pkey -in privateKey.pem -out publicKey.pem -pubout
const crypto = require('crypto')
const fs = require('fs')
const private_key = fs.readFileSync('digital_sign/privateKey.pem', 'utf-8')
//File to be signed
const package = fs.readFileSync('webpackage.zip')
@moughamir
moughamir / rfc3161.txt
Created July 29, 2019 18:27 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
http://sha256timestamp.ws.symantec.com/sha256/timestamp
http://timestamp.globalsign.com/scripts/timstamp.dll
https://timestamp.geotrust.com/tsa
http://timestamp.verisign.com/scripts/timstamp.dll
http://timestamp.comodoca.com/rfc3161
http://timestamp.wosign.com
http://tsa.startssl.com/rfc3161
http://time.certum.pl
http://timestamp.digicert.com
https://freetsa.org
@moughamir
moughamir / AndiroVoteToken.sol
Created June 14, 2019 09:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
contract AndiroVoteToken {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {