Skip to content

Instantly share code, notes, and snippets.

View tonytrangmail's full-sized avatar

tonytrangmail

View GitHub Profile
@juanca
juanca / gist:669c59f15a17e20022b8bd78b12889e6
Created October 9, 2020 18:43
github_full_width.js -- responsive github because why not?
javascript:
((n = document.getElementsByClassName('new-discussion-timeline')[0]) && (n.style['max-width'] = '90%') && false);
@erikdw
erikdw / github_load_all_diffs.js
Last active November 4, 2020 15:50 — forked from juanca/github_load_all_diffs.js
Github PR bookmarklet: Load all file diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click());
document.querySelectorAll('.js-details-target').forEach(node => node.click());
// Both of those buttons should have the '.btn-link' class too, but I wasn't able to quickly figure out how to
// add an AND condition to that. Tried the below, didn't work:
//document.querySelectorAll('[.btn-link][.load-diff-button]').forEach(node => node.click());
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;