Skip to content

Instantly share code, notes, and snippets.

View Telematica's full-sized avatar

Héctor Cerón Figueroa Telematica

View GitHub Profile
@vikpe
vikpe / fix_authenticity_of_github_problem.md
Last active May 3, 2025 03:10
FIX: The authenticity of host github.com can't be established.

Error

The authenticity of host 'github.com (140.82.113.4)' can't be established.

Fix

ssh-keyscan github.com >> ~/.ssh/known_hosts
@snzubair
snzubair / PY0101EN-2-1-Tuples.ipynb
Created February 19, 2020 18:12
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marceloalmeida
marceloalmeida / .gitattributes
Last active July 11, 2024 20:15
How to show diffs for gpg-encrypted files?
*.gpg filter=gpg diff=gpg
*.asc filter=gpg diff=gpg
@kentbrew
kentbrew / finding_twitter_user_id.md
Last active March 27, 2025 02:44
Finding Twitter User IDs

Finding Twitter User IDs

User accounts on Twitter are commonly identified by screen name, which may be changed by operators when they take over an account, or have been sitting on an old account for a long time and want to transition it into malicious use.

User IDs, however, are permanent. There are several services out there that will try to find them for you but it seems like a bad idea to me, since you're alerting them to the fact that there's something interesting about this account. There's also plenty of bad advice that uses many long-since-abandoned Twitter API endpoints.

As of this writing (2018-02-18) you can view source and search for /profile_banners/, which will show something like this:

.enhanced-mini-profile .mini-profile .profile-summary {
@Pitasi
Pitasi / check_telegram_signature.js
Last active January 4, 2025 11:56
Telegram website login widget, signature check sample using Node.js
// Copied by https://gist.github.com/dotcypress/8fd12d6e886cd74bba8f1aa8dbd346aa,
// thanks for improving code style
const { createHash, createHmac } = require('crypto');
const TOKEN = "ABC:12345...";
// I prefer get the secret's hash once but check the gist linked
// on line 1 if you prefer passing the bot token as a param
const secret = createHash('sha256')
.update(TOKEN)
<?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;
@jeffochoa
jeffochoa / Response.php
Last active May 6, 2025 01:52
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@qti3e
qti3e / README.md
Last active May 12, 2025 12:47
List of file signatures and mime types based on file extensions
@kohashi
kohashi / index.d.ts
Last active April 24, 2021 21:44
animejs/anime.js type definitions for TypeScript. See also https://github.com/kohashi/types-npm-animejs
declare var anime: AnimeStatic;
declare var animejs: AnimeStatic;
/** Query selector string. Same as jQuery. */
declare type target = string | Element | NodeList | Object | any[];
@zeroc0d3
zeroc0d3 / export_sqlite.sh
Created March 27, 2017 10:33
Export data from sqlite3 file using bash script
#!/bin/sh
#################
# ZeroC0D3 Team #
#################
### STEP ###
# 1) Download binary file "sqlite3" from
# https://www.sqlite.org/
# 2) Extract binary "sqlite3" to your PATH_BIN
# 3) Set your file name in PATH_TARGET_DUMP for all schema & data