Skip to content

Instantly share code, notes, and snippets.

View ajsb85's full-sized avatar
🖼️
Engaging cognitive processors...

Alexander Salas Bastidas ajsb85

🖼️
Engaging cognitive processors...
View GitHub Profile
@nuta
nuta / index.html
Last active June 14, 2024 01:03
CP2102 (used by ESP32-DevKitC) WebUSB device driver (deprecated: use Serial API instead: https://crbug.com/884928)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>esptool.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/xterm.min.js" integrity="sha256-8rsVcpCnO6HdeJL84i0VdubjM42fjSmO8aONghdq3gc=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/xterm.min.css" integrity="sha256-w69o8Y6P5VZjfYFmn2KlqMU7TUi2I+oWObi8FLlVZZg=" crossorigin="anonymous" />
</head>
/**
Simple(ish) example of discord gateway
This code will get to ready, and then remain connected with heartbeats
see https://discordapi.com/topics/gateway for more info
zlib compression is implemented as it will be required in gateway v7 (so get used to it now)
*/
const WebSocket = require('ws'); // npmjs.org/ws
const zlib = require('zlib-sync'); // npmjs.org/zlib-sync
const erlpack = require('erlpack'); // github.com/discordapp/erlpack
@mort3za
mort3za / git-auto-sign-commits.sh
Last active July 27, 2026 13:18
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@ajsb85
ajsb85 / android-inventory.json
Last active October 3, 2017 13:14
New proposal from the android library of Flyve MDM
{
"request": {
"query": "INVENTORY",
"versionClient": "",
"deviceId": "unknown",
"content": {
"accessLog": {
"logDate": "2017-10-02 16:45:04",
"userId": "N/A"
},
@teclib-bot
teclib-bot / report.css
Created September 25, 2017 21:10
Style sheet for android coverage
h1 {
font-weight:bold;
font-size:18pt;
}
.breadcrumb {
border:#d6d3ce 1px solid;
padding:2px 4px 2px 4px;
}
@teclib-bot
teclib-bot / stylesheet.css
Last active September 25, 2017 21:11
Stylesheet for Javadoc documentation
/* Javadoc style sheet */
/*
Overall document style
*/
footer h4 {
font-size: 24px;
}
@agentcooper
agentcooper / 0.README.md
Last active April 4, 2026 00:28
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

Keybase proof

I hereby claim:

  • I am naylin15 on github.
  • I am naylin15 (https://keybase.io/naylin15) on keybase.
  • I have a public key ASD5sW0uWl9sB4H1rwmg5ehQpiChkRQu8xHzZr2O-6rPyAo

To claim this, I am signing this object:

@iamsaso
iamsaso / index.html
Last active September 21, 2022 11:04
GraphiQL with JWT
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}