Skip to content

Instantly share code, notes, and snippets.

View hnjm's full-sized avatar
🇾🇪
I may be slow to respond.

Hassan Najm hnjm

🇾🇪
I may be slow to respond.
View GitHub Profile
@hnjm
hnjm / RSA.cls
Created April 10, 2019 07:14 — forked from nikitakarpenkov/RSA.cls
RSA encryption / decryption in salesforce apex
public class RSA {
private Key key;
// Hex digits
private static final String DIGITS = '0123456789abcdef';
private static final Decimal HEX_BASE = 16;
public abstract class Key {
private String modulus;
public Key(String modulus) {
@hnjm
hnjm / main.go
Created June 6, 2019 08:11 — forked from eagletmt/main.go
List installable Android SDK packages (similar to sdkmanager --verbose --list)
package main
import (
"encoding/xml"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@hnjm
hnjm / ASFUriHelper
Created August 5, 2019 03:40 — forked from asifmujteba/ASFUriHelper
Get Real Path from Uri
@TargetApi(Build.VERSION_CODES.KITKAT)
public static String getPath(final Context context, final Uri uri) {
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
// DocumentProvider
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
@hnjm
hnjm / Devices.cs
Created September 9, 2019 05:43 — forked from mohibsheth/Devices.cs
Xamarin Android: Helper class to get the consumer friendly device name.
/*
* Copyright (C) 2015 Mohib Sheth <mohib.sheth@gmail.com>
*
* Original Java version Copyright (C) 2014 Jared Rummler <jared.rummler@gmail.com>
* https://gist.github.com/jaredrummler/16ed4f1c14189375131d
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
********************
Wic Reset Free 78 ->>->>->>
********************
http://shurll.com/cz1st
(Copy & Paste link)
********************
@hnjm
hnjm / ParameterizedSQLQueryInXPO.cs
Created October 7, 2020 00:51 — forked from devlights/ParameterizedSQLQueryInXPO.cs
[DevExpress][XPO] Session.ExecuteQuery() using a parameterized SQL query
var dataStore = new InMemoryDataStore();
var dataLayer = new SimpleDataLayer(dataStore);
using (var uow = new UnitOfWork(dataLayer))
{
var sql = "SELECT Id, Name FROM BookGenre WHERE Name = @Name";
var pNames = new string[] { "Name" };
var pValues = new object[] { "Computer" };
var dbData = uow.ExecuteQuery(sql, pNames, pValues);
@hnjm
hnjm / freebitco Multiplay script.js
Created March 7, 2022 01:10 — forked from makaAnarchy/freebitco Multiplay script.js
freebitco.in best script to play Multiply BTC with 63% win chance
// ==UserScript==
// @name Best algorithm to play Multiply odd 1.5 win chance 63% (NOT FOR LOW BALANCE)
// @description Play with higher chance , READ FIRST
// @include https://freebitco.in/*
// @copyright 2020, makaaymen@gmail.com
// @namespace AnarchyHS
// ==/UserScript==
bconfig = {
@hnjm
hnjm / CVE-2022-38802
Created January 25, 2023 05:21 — forked from hamoshwani/CVE-2022-38802
Administrator can exploit XSS into local file read using PDF generator in Zkteco Biotime
Security Advisory
Topic: Administrator can exploit XSS into local file read using PDF generator in Zkteco Biotime
Category: Zkteco Biotime
Module: webgui
Announced: 01-09-2022
Credits: Ahmed Kameran From https://technobase.krd/ -- https://twitter.com/hamoshwani
CVE ID: CVE-2022-38802
Affects: BioTime - < 8.5.3 Build:20200816.447
@hnjm
hnjm / gist:25f4bce2d071b47e41d7e0646685be11
Created March 10, 2023 02:32 — forked from steven-r/gist:90b088b99a753ea51ce9
Example on how to cache values for API calls
#region copyright
// /* Copyright (C) think2infinity LLC - All Rights Reserved
// *
// * TimeJack
// *
// * Written by Stephen Reindl <stephen@think2infinity.com>, 09 2013
// *
// */
#endregion