Skip to content

Instantly share code, notes, and snippets.

View ndastur's full-sized avatar

Neville Dastur ndastur

  • Clinical Software Solutions
View GitHub Profile
@c0mm4nDer
c0mm4nDer / Notification.cs
Created October 8, 2017 16:19
One Signal ClearOneSignalNotifications For Xamarin.Android
/* All xamarin programmers know that binding libraries is not always done correctly.
One of these libraries is OneSignal. In OneSignal plugin, there is a method called "ClearOneSignalNotifications"
that clears all notifications displayed.
This method is not included in the binding provided for xamarin.For Fix this we should rewrite this method.
You can see original code of this method in [OneSignal SDK Android](https://github.com/OneSignal/OneSignal-Android-SDK/blob/b1c01e0404b3f39d433f48abfa79c99e2af1f6f0/OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignal.java).
I used ADO for connect to sqlite but you can rewrite it by any kind of sqlite connection. I hope this code can help you.*/
using Android.App;
using Android.Content;
using Mono.Data.Sqlite;
@ErikAugust
ErikAugust / spectre.c
Last active January 5, 2025 07:01
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@ptrstpp950
ptrstpp950 / preRequestScript.js
Last active April 18, 2024 21:10
Calculate TOTP in Postman
//Article about TOTP on my blog https://stapp.space/generate-totp-in-postman/
/**
* @preserve A JavaScript implementation of the SHA family of hashes, as
* defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding
* HMAC implementation as defined in FIPS PUB 198a
*
* Copyright Brian Turek 2008-2017
* Distributed under the BSD License
* See http://caligatio.github.com/jsSHA/ for more information