Skip to content

Instantly share code, notes, and snippets.

@elsayed85
elsayed85 / imei-eg.sh
Last active January 1, 2025 19:18
Replace 351941237314725 With Your IMEI
curl 'https://api-citizens-prod-imei.gs-ef.com/ceirimeicheck/api/v1/imei/check'
-H 'Host: api-citizens-prod-imei.gs-ef.com'
-H 'Content-Type: application/json'
-H 'Accept: */*'
-H 'Connection: keep-alive'
-H 'Accept-Language: en'
-H 'Content-Length: 34'
-H 'Accept-Encoding: gzip, deflate, br'
-H 'User-Agent: CitizenApp_Ntra/1.0.0 CFNetwork/1568.300.101 Darwin/24.2.0'
--data '{"imeiNumber":["351941237314725"]}'
@hanxiao
hanxiao / testRegex.js
Last active February 26, 2025 12:22
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@lukasgabriel
lukasgabriel / README.md
Last active December 27, 2024 16:09
ChatGPT Raindrop.io Plugin/GPT

README

This is the metadata and OpenAPI spec I created for a custom ChatGPT plugin (or GPT, as OpenAI calls them) that can search your Raindrop.io bookmark library for you. It is tested and working, albeit with mixed results when dealing with large amounts of tags and collections. With further tuning of the system prompt and OpenAPI spec, it could be vastly improved.

Here is the unpublished plugin: https://chat.openai.com/g/g-uNdVJh9vu-raindrop-io-search-assistant
I will update it if I ever get the OAuth to work, until then, it won't work unfortunately.

I decided against publishing on the 'GPT Store' because I could not get the OAuth login to work despite following Raindrop.io and OpenAI documentation closely. Also, such an integration should probably be provided by the Raindrop.io devs anyways.

@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active February 17, 2025 14:12
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d [email protected]
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@davidfurlong
davidfurlong / JSON.stringify-replacer-sort-keys.js
Last active March 6, 2025 02:17
JSON.stringify replacer function for having object keys sorted in output (supports deeply nested objects)
// Spec http://www.ecma-international.org/ecma-262/6.0/#sec-json.stringify
const replacer = (key, value) =>
value instanceof Object && !(value instanceof Array) ?
Object.keys(value)
.sort()
.reduce((sorted, key) => {
sorted[key] = value[key];
return sorted
}, {}) :
value;
@scottopell
scottopell / fix_exfat_drive.md
Last active February 22, 2025 11:10
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

If Disk Utility is unable to repair, consider trying this:

  1. In Disk Utility, ensure that the drive is not mounted, eject it if it is mounted.
  2. Use diskutil list to find the right drive id.
  3. You want the id under the IDENTIFIER column, it should look like disk1s1
  4. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  5. -d is debug so you'll see all your files output as they're processed.
@weslleih
weslleih / date.extensions.ts
Last active November 11, 2023 08:00
Extend the TypeScript Date Object with some useful methods
export {}
declare global {
interface Date {
addDays(days: number, useThis?: boolean): Date;
isToday(): boolean;
clone(): Date;
isAnotherMonth(date: Date): boolean;
isWeekend(): boolean;
isSameDate(date: Date): boolean;
@twolfson
twolfson / README.md
Last active June 10, 2023 08:23
timever, time based versioning

timever

time-ver

Time based versioning

Synopsis

For versioning published releases of websites/services, we use a datetime based string to denote different releases

DATE.TIME.SUBTIME

// Zero-Clause BSD (more permissive than MIT, doesn't require copyright notice)
//
// Permission to use, copy, modify, and/or distribute this software for any purpose
// with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
// OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
@DarkLotus
DarkLotus / No animation
Created August 22, 2014 09:00
Remove default animation from Xamarin forms navigation renderer
/*
Shared implementation, use in place of NavigationPage
*/
using Xamarin.Forms;
namespace LakesEntrance
{
public class NoAnimationNavigationPage : NavigationPage
{
public NoAnimationNavigationPage(Page startupPage) :base(startupPage)