Skip to content

Instantly share code, notes, and snippets.

View kidager's full-sized avatar
🎧
¯\_(ツ)_/¯

Jacem Chaieb kidager

🎧
¯\_(ツ)_/¯
View GitHub Profile
@kidager
kidager / look-for-rdv.user.js
Last active May 15, 2021 16:55
look-for-rdv.user.js
// ==UserScript==
// @name Doctolib RDV finder
// @namespace https://jacem.chaieb.me
// @version 1.0.2
// @downloadURL https://gist.githubusercontent.com/kidager/c39fa858c6aa090e700522b02ec2b6a5/raw/look-for-rdv.user.js
// @updateURL https://gist.githubusercontent.com/kidager/c39fa858c6aa090e700522b02ec2b6a5/raw/look-for-rdv.user.js
// @description Try to find a covid vaccination slot on doctolib
// @author Jacem Chaieb <jacem@chaieb.me>
// @match https://www.doctolib.fr/
// @match https://www.doctolib.com/
@kidager
kidager / look-for-rdv.sh
Created May 13, 2021 17:11
look-for-rdv.sh
#!/bin/bash
# Install
# >>> sudo apt-get install jq procps xdg-utils
# Run
# >>> watch -d --color --interval 5 --exec ./look-for-rdv.sh
# Logs
# >>> tail -f requests.log
@kidager
kidager / snippet.md
Last active April 29, 2019 11:42
snippet.md

I have a helper function to nuke everything so that our Continuous blah, cycle can be tested, erm... continuously. Basically it boils down to the following:

To clear containers:

docker rm -f $(docker ps -a -q)

To clear images:

@kidager
kidager / App\Managers\CustomSocialiteManager.php
Created January 21, 2019 10:57
Workaround for Socialite ^3.0
<?php
namespace App\Managers;
use App\Providers\CustomGoogleProvider;
use Laravel\Socialite\SocialiteManager;
class CustomSocialiteManager extends SocialiteManager
{
/**
@kidager
kidager / mongo-docker.bash
Created January 16, 2019 09:57 — forked from davideicardi/mongo-docker.bash
Running mongodb inside a docker container (with mongodb authentication)
# Create a container from the mongo image,
# run is as a daemon (-d), expose the port 27017 (-p),
# set it to auto start (--restart)
# and with mongo authentication (--auth)
# Image used is https://hub.docker.com/_/mongo/
docker pull mongo
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception)
# add a root user
<?php
$response = $guzzleClient->get(
// 'list.htm?tri=initial&idtypebien=2,1&div=2238&idtt=1&naturebien=1,2,4&LISTING-LISTpg=2'
'list.htm?tri=initial&idtypebien=2,1&div=2238&idtt=2,5&naturebien=1,2,4&LISTING-LISTpg=1'
// 'list.htm?tri=initial&idtypebien=1,2&cp=75&idtt=1&naturebien=1,2,4&bd=DetailToList_SL'
);
$html = (string)$response->getBody();
$internalErrors = libxml_use_internal_errors(true);
$dom = new DOMDocument('1.0', 'UTF-8');
@kidager
kidager / console.php
Created June 26, 2018 13:01
scrap scrap
<?php
// Some Artisan stuff
Artisan::command('do:shit', function () {
$guzzleClient = new GuzzleHttp\Client([
'base_uri' => 'https://www.seloger.com',
'headers' => [
'Connection' => 'keep-alive',
'Pragma' => 'no-cache',
@kidager
kidager / keybase.md
Last active June 10, 2021 21:02
Verifying Keybase.io ID

Keybase proof

I hereby claim:

  • I am kidager on github.
  • I am kidager (https://keybase.io/kidager) on keybase.
  • I have a public key ASDxWcbyjzUH2jRpYh8L0QjAbfJF0305kj6OFK4SS7uYBwo

To claim this, I am signing this object:

@kidager
kidager / pgp.pub
Last active June 12, 2023 09:51
Public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGEnX7oBEACYjUsjraxzpq8876ZEZz2zMJEEIp1oVXi9/cTPJ4fvMLrW8bTz
za/rHcnfG7WwMgG1COACUTS1uZqwI8N+KsLNjVWU4dXUctzlGrqsfNC6Boj0g8Cd
NTzMlfvZuzRE2lWEbbfDt6ie+IbgNNNNyk7sSEJ40qYI3hYAale0NmGIkeFMXkY/
8U/XMCm1CMGgo4QN7BtmBU9n50Qc7s5yOzd1htxjif2e1P5T8c/YVzBEZM/XwoeS
PhZlf82tG7T8dY/tujfjfHaerJXCB1j93z8PjciEZ/obT7sNPbF7UEr0PMzpjhRu
aA/97ELOjTQ0Gc7+Gyd76F1XpLI0gcQbY0ddvVWINx9EgDPUJ9zCAaTdwOve/nuf
IAxTzrzNwUCgZaOB6UieNgtozj/zB5aSroq8maTs3QCuz+9xFoUqYYHgnmb1/a6u
EmlrIYhWgKqoq8eQv/MP+FPEnpB6NIol19TURGETJ2qdD/PQH8C+ML+KgurKt4BZ
##crypto
##defocus
##javascript
##linux
##math
##networking
##php
##security
#android
#android-dev