Skip to content

Instantly share code, notes, and snippets.

View Logicbloke's full-sized avatar

Taha Logicbloke

View GitHub Profile
Verifying that +logicbloke is my blockchain ID. https://onename.com/logicbloke
@Logicbloke
Logicbloke / MainActivity.java
Created January 13, 2018 09:59
Geolocation across Android versions
public class MainActivity extends AppCompatActivity {
final private int REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS = 124;
private LocationManager locationManager;
private LocationListener locationListener;
private Location CurrentLocation;
SharedPreferences prefs;
@Override
@Logicbloke
Logicbloke / kahoot.php
Created May 31, 2020 02:30
Cheat: Revealing all questions and answers of a Kahoot quiz.
<?php
error_reporting(null);
if(!isset($_GET["pin"]))
die("No PIN?");
$url = "https://kahoot.it/rest/challenges/pin/".$_GET["pin"];
$response = file_get_contents($url);
$jresponse = json_decode($response, TRUE);
@Logicbloke
Logicbloke / config.php
Created January 1, 2024 22:23
PHP Import Mailbox using IMAP
<?php
$sourceServer = "{mail.mtlmaroc.com:993/imap/ssl}"; // ISP Mailserver Example (Menara.ma)
$destinationServer = "{ssl0.ovh.net:993/imap/ssl}"; // OVH Mailserver
// A list of folders that will be skipped.
// NOTE - If a parent folder is listed, all children folders are skipped too
$folders_skip = array(
"Protected",
@Logicbloke
Logicbloke / gist:c3f32d05cbd1002ae35c2c8b2c91ee47
Created October 16, 2024 16:07
Run command in argument across all ssh servers under .ssh/config
#!/bin/sh
# Check if a command argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 <command>"
exit 1
fi
# Define the host prefix if provided, otherwise set to an empty string
HOST_PREFIX="${HOST_PREFIX:-}"