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

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 / 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 <[email protected]>
# Modified by: alirobe <[email protected]> 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 / mapDispatchToProps.md
Created September 6, 2018 17:52 — forked from heygrady/mapDispatchToProps.md
Redux containers: mapDispatchToProps

Redux containers: mapDispatchToProps

This document details some tips and tricks for creating redux containers. Specifically, this document is looking at the mapDispatchToProps argument of the connect function from [react-redux][react-redux]. There are many ways to write the same thing in redux. This gist covers the various forms that mapDispatchToProps can take.

@moughamir
moughamir / README.md
Created May 10, 2018 17:26 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@moughamir
moughamir / 0_reuse_code.js
Created March 14, 2016 19:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console