Skip to content

Instantly share code, notes, and snippets.

View pedropapa's full-sized avatar
🏠
Working from home

Pedro Papadopolis pedropapa

🏠
Working from home
  • Sydney, Australia
View GitHub Profile
@pedropapa
pedropapa / y_testing_mocks.inc
Last active September 4, 2023 13:16
Mock & Spy capabilities for y_testing
#include <YSI_Data\y_hashmap>
#define MAX_MOCK_FUNCTIONS 100
#define MAX_FUNCTION_CALLS 100
#define MAX_FUNCTION_NAME 32
#define MAX_FUNCTION_PARAMS_VALUE 2048
enum MockFunctionCallMap
{
FunctionName[MAX_FUNCTION_NAME],
@pedropapa
pedropapa / whatsapp_group_flooders.js
Last active January 3, 2022 19:39
Rank whatsapp group contacts sorting by messages count
/**
* Requirements:
* - NodeJS 12+
*
* Instructions:
* - To get whatsapp group messages file, first go to the group in whatsapp, then select "export chat" option.
* Retrieve the file from your phone and put it somewhere in your computer.
*/
const fs = require('fs');
@pedropapa
pedropapa / whatsapp_group_flooders.html
Last active January 1, 2022 18:59
Rank whatsapp group contacts sorting by messages count
<html>
<body>
<script type="text/javascript">
/**
* To get whatsapp group messages file, first go to the group in whatsapp, then select "export chat" options.
* Retrieve the file from your phone and put it in the same directory as this .html file.
*/
const fileName = prompt('Enter whatsapp group messages backup file, without extension (txt).\n\nPS: File must be in same directory as this file.', '_chat');
const data = fetch(fileName + '.txt', { mode: 'no-cors' })
@pedropapa
pedropapa / bancos.json
Last active February 19, 2019 16:36
Bancos Brasileiros
[
{
"IdBank": 1,
"Code": "001",
"Name": "BANCO DO BRASIL",
"CreatedAt": "2017-04-19 15:52:42.400",
"UpdatedAt": null,
"DeletedAt": null,
"IsDeleted": false
},
<?php
$forceUpdate = ($argv[1] === 'force');
if ($forceUpdate) {
echo "Resetando arquivos que serão mantidos...\n";
}
$veiculosRemovidos = 0;
foreach (vars() as $folder => $exts) {
foreach ($exts as $ext => $vars) {
import { DirectoryEntry, File, FileEntry } from '@ionic-native/file';
import * as async from 'async';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Observable } from 'rxjs/Observable';
import { ReplaySubject } from 'rxjs/ReplaySubject';
import 'rxjs/add/observable/throw';
import { from } from 'rxjs/observable/from';
const VIDEO_INFO_STORAGE_KEY = 'JBRJ-VIDEO-INFO-';
const FILE_CHUNK_SIZE = 50000000; // 50mb
version: "3"
services:
rediscollab:
image: padraoix/redis
environment:
REDIS_TYPE: master
REDIS_CLUSTER: 'no'
deploy:
@pedropapa
pedropapa / object.js
Last active October 1, 2017 17:14
RageMP's full mp object
{ versions: { core: '0.3 beta', net: 1 },
config:
{ maxplayers: 50,
name: '[:.:.Brazuca\'s Server.:.:] Minigames',
gamemode: 'minigames',
streamdistance: 500,
announce: true,
port: 22005,
password: 'changeme',
'max-ping': 200,
@pedropapa
pedropapa / extractor.js
Last active September 28, 2017 23:19
SA-MP forums contributors ranking extractor
/**
* How to run:
*
* 1. Open Google Chrome.
* 2. Open SA-MP forums url (http://forum.sa-mp.com/forumdisplay.php)
* 3. Open browser's console (Windows: ctrl + shift + i, MacOS: command + shift + i).
* 4. Copy & Paste this script in the console.
* 5. Hit enter to run the code.
* 6. Follow instructions shown.
*
@pedropapa
pedropapa / ranking.txt
Last active September 9, 2022 09:39
SA-MP's contributors ranking
This file has been truncated, but you can view the full file.
1º: CuervO | Contributions: 6 | Views: 2413373 | Answers: 8342
Contributions:
FilterScript:
Advanced Inventory/Object Managament Script (DayZ Themed) [SQL;Dynamic;Beta] | Answers: 60 | Views: 24399
Spotlight for Helicopters [0.3c] | Answers: 32 | Views: 14345
Live Map Editor [DINI/ZCMD] | Answers: 29 | Views: 10998
Nanosuit | Answers: 6 | Views: 1490
GameMode:
[GM] Raven's Roleplay [2.5b] | Answers: 8069 | Views: 2324131
Team Fortress 2 | Answers: 146 | Views: 38010