Skip to content

Instantly share code, notes, and snippets.

View vzool's full-sized avatar
🎯
Focusing

Abdelaziz Elrashed vzool

🎯
Focusing
View GitHub Profile
@vzool
vzool / openpgp.txt
Created October 26, 2017 07:13
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:c1cea20af6e52c60abbcee3c07c1ad8a5eb196a1]
@vzool
vzool / openpgp.txt
Created October 26, 2017 07:13
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:c1cea20af6e52c60abbcee3c07c1ad8a5eb196a1]
@vzool
vzool / openpgp.txt
Created November 24, 2017 06:48
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:795188067a8ac283c8a0c32ebe6ceed9e8b93a49]
@vzool
vzool / openpgp.txt
Created November 24, 2017 06:48
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:795188067a8ac283c8a0c32ebe6ceed9e8b93a49]
@vzool
vzool / openpgp.txt
Created November 24, 2017 06:49
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:795188067a8ac283c8a0c32ebe6ceed9e8b93a49]
@vzool
vzool / openpgp.txt
Created November 24, 2017 06:49
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:795188067a8ac283c8a0c32ebe6ceed9e8b93a49]
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.6
Comment: Hostname: gpg.NebrWesleyan.edu
mQENBFoXLK4BCAD1yPex8TgzEd9zKLHZdwMrxjttLw95+tchuqfvaX8o2OutTFH8y99FAbVn
rXacPGNcUaL9lqbqdJgcez6ie0yWjLSlqcsPXkz07lvB3Ebmh38mFnKv/knGnw3W9uUNmmIj
rfoVGt72kXOfRWUZR8XviuB/c4XEAPazWY+4ILokIrLL6UooPvIeWl5jbPA0EaYztSe9uV/+
T7gc8T/N6ruP97fGyUgltb1/BfJFWX76pmHAQb6hxV0dBJGF+5W1HX/f4IRc4Cn9iOw1J2GN
71bLX41R7Q+EGhGQ9Z94+GlnUMPyCODhq5uHfrNnEx3wkTpu4eXpt++ho9GqgcMQDR4/ABEB
AAG0Jk1yLiBBYmRlbGF6aXogRWxyYXNoZWQgPGFlZW1oQGFvbC5jb20+iQEcBBABCgAGBQJa
@vzool
vzool / hash_hmac_receiver.php
Created November 28, 2017 09:42 — forked from samarpanda/hash_hmac_receiver.php
Adding content verification using hmac in php
<?php
function get_private_key_for_public_key($public_key) {
// extract private key from database or cache store
return 'private_key_user_id_9999';
}
// Data submitted
$data = $_GET['data'];
$data = json_decode(stripslashes($data), TRUE);
@vzool
vzool / Vue-global-event-dispatcher.js
Created November 30, 2017 09:20
Vue.js Global Event Dispatcher
window.Event = {
vue: new Vue(),
on: function(event, callback){
this.vue.$on(event, callback);
},
fire: function(event, data){
this.vue.$emit(event, data);
@vzool
vzool / PickDominantColor.java
Created March 22, 2018 11:34 — forked from KKorvin/PickDominantColor.java
How to pick dominant color from image on Android. Palette Google library used.
// Don't forget to add Palette library to your build.gradle
// compile 'com.android.support:palette-v7:+'
public static int getDominantColor(Bitmap bitmap) {
List<Palette.Swatch> swatchesTemp = Palette.from(bitmap).generate().getSwatches();
List<Palette.Swatch> swatches = new ArrayList<Palette.Swatch>(swatchesTemp);
Collections.sort(swatches, new Comparator<Palette.Swatch>() {
@Override
public int compare(Palette.Swatch swatch1, Palette.Swatch swatch2) {
return swatch2.getPopulation() - swatch1.getPopulation();