Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>
@Gabboxl
Gabboxl / markdown-resize.md
Created February 21, 2021 14:00
Resize images with Markdown on Github

![alt text](images/str2logic.png){:height="205px" width="936px"}

@Gabboxl
Gabboxl / logcat.log
Created March 18, 2021 09:50
logcat lshal gnss@1.0 hwbinder
gprimeltexx:/ # lshal
| All binderized services (registered with hwservicemanager)
VINTF R Interface Thread Use Server Clients
FM Y android.frameworks.displayservice@1.0::IDisplayService/default 0/1 386 249
DC,FM Y android.frameworks.schedulerservice@1.0::ISchedulingPolicyService/default 0/4 778 249
DC,FM Y android.frameworks.sensorservice@1.0::ISensorManager/default 0/4 778 249
FM Y android.frameworks.stats@1.0::IStats/default 0/4 778 249
DM,FC Y android.hardware.audio.effect@6.0::IEffectsFactory/default 0/4 358 379 249
DM,FC Y android.hardware.audio@6.0::IDevicesFactory/default 0/4 358 379 249
DM,FC Y android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvidersFactory/default 0/4 358 249
@Gabboxl
Gabboxl / logcat.log
Created March 22, 2021 12:38
memfd logcat
--------- beginning of crash
03-22 08:03:59.350 761 770 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 770 (Jit thread pool), pid 761 (system_server)
03-22 08:03:59.540 850 850 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-22 08:03:59.547 850 850 F DEBUG : LineageOS Version: '18.1-20210321-UNOFFICIAL-gprimeltexx'
03-22 08:03:59.547 850 850 F DEBUG : Build fingerprint: 'google/walleye/walleye:8.1.0/OPM1.171019.011/4448085:user/release-keys'
03-22 08:03:59.547 850 850 F DEBUG : Revision: '0'
03-22 08:03:59.547 850 850 F DEBUG : ABI: 'arm'
03-22 08:03:59.549 850 850 F DEBUG : Timestamp: 2021-03-22 08:03:59+0100
03-22 08:03:59.549 850 850 F DEBUG : pid: 761, tid: 770, name: Jit thread pool >>> system_server <<<
03-22 08:03:59.550 850 850 F DEBUG : uid: 1000
@Gabboxl
Gabboxl / ql.txt
Created February 8, 2023 14:43
Get nodes that are attached/belong to a way with Overpass
node["railway"~"station"]
({{bbox}});
way(bn)->.wy;
node._(w.wy);
out;
@Gabboxl
Gabboxl / ApiPolicyWrapper.cs
Last active April 11, 2023 13:29
Wrapper class to apply Polly policies to a Refit http client (+ getting Refit client instance using dependency injection)
using Polly;
using Refit;
using System;
using System.Threading.Tasks;
using Windows.ApplicationModel.Core;
using Windows.System;
using Windows.UI.Xaml.Controls;
namespace ClassevivaPCTO.Utils
@Gabboxl
Gabboxl / cvendpoints1.txt
Created June 1, 2023 16:17
Classeviva endpoints
rest/v1/students/{studentId}/lessons/{start}/{end}
rest/v1/students/{studentId}/homeworks/removeStudentFile/{evtCode}/{homeworkId}/{fileId}
rest/v1/students/{studentId}/absences/details/{begin}/{end}
rest/v1/students/{studentId}/cards
rest/v1/students/{studentId}/subjects
rest/v1/students/{studentId}/homeworks/insertStudentMsg/{evtCode}/{evtId}
rest/v1/students/{studentId}/homeworks/uploadStudentFile/{evtCode}/{evtId}
rest/v1/students/{studentId}/agenda/all/{begin}/{end}
rest/v1/students/{studentId}/homeworks/setTeacherMsgStatus/{evtCode}/{evtId}
rest/v1/students/{studentId}/virtualclasses/agenda/{date_start}
@Gabboxl
Gabboxl / transition.cs
Created July 22, 2023 16:47
EntranceThemeTransition code only
// Create an instance of EntranceThemeTransition
EntranceThemeTransition entranceThemeTransition = new EntranceThemeTransition();
// Set the properties of the transition
entranceThemeTransition.FromHorizontalOffset = 100; // From where the animation will start horizontally
entranceThemeTransition.FromVerticalOffset = 100; // From where the animation will start vertically
// Get the parent container of the element
var panel = myElement.Parent as Panel;
@Gabboxl
Gabboxl / DECOMPILING_AN_ELECTRON_APP.md
Created August 20, 2023 20:37 — forked from frolleks/DECOMPILING_AN_ELECTRON_APP.md
How to decompile an Electron app

Let me tell you how easy it is to decompile an Electron app (that's closed source).

Prerequisites

Decompilation

First of all, you find the install path of your Electron app. If you found it, find the resources folder. If you found it, you'll have to install asar globally, by running:

@Gabboxl
Gabboxl / test.md
Created September 6, 2023 21:23
select aggreate join strings c#

You can use the Select and Aggregate LINQ methods to create a comma-separated string of all teacher names. Here's how you can do it:

List<Teacher> teachers = new List<Teacher>
{
    new Teacher { teacherId = "1", teacherName = "Teacher1" },
    new Teacher { teacherId = "2", teacherName = "Teacher2" },
    // ... other teachers ...
};