Skip to content

Instantly share code, notes, and snippets.

View moughamir's full-sized avatar
:shipit:
inspecting the elements

Mohamed Moughamir moughamir

:shipit:
inspecting the elements
View GitHub Profile
@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 {
@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 / keybase.md
Created June 28, 2018 09:19
keybase.md

Keybase proof

I hereby claim:

  • I am moughamir on github.
  • I am omnizya (https://keybase.io/omnizya) on keybase.
  • I have a public key ASDJHmguZx6oEZxyaEYP8NkUMcrE7ycAW4hSy6kYIQuVLgo

To claim this, I am signing this object:

@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
})
@moughamir
moughamir / init.sh
Created March 6, 2018 13:16
Dev Env Init
#!/bin/bash
# Install Yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
# Update Terminal
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
echo export BASH_IT_THEME="modern" >> ~./bashrc
~/.bash_it/install.sh
source ~./bashrc
@moughamir
moughamir / eth
Created September 6, 2017 13:44
EthWallet ofc
0x8A1d23a8CD0d453A50D783F8F775007c75D0867a
0xF7AE28007FE3A251104D2ab21BF92DA70890c259