Skip to content

Instantly share code, notes, and snippets.

@sandyjmacdonald
sandyjmacdonald / code.py
Created January 23, 2021 11:23
Emergency cat GIF macro example for Pimoroni RGB Keypad for Raspberry Pi Pico
import time
import board
import busio
import usb_hid
from adafruit_bus_device.i2c_device import I2CDevice
import adafruit_dotstar
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
@baptx
baptx / instagram-api_direct_messages_backup.js
Last active August 2, 2024 06:04
Instagram API: view and backup direct messages from a web browser
/*
Instagram API: view and backup direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
1) Log in on Instagram web version and go to your profile page
(the home page will not work because it loads data when scrolling down and the direct messages will be displayed at the bottom of the page)
2) Modify HTTP headers with a browser addon like Header Editor (https://addons.mozilla.org/en-US/firefox/addon/header-editor/)
@epilys
epilys / gist:ee2b82baa50a1b81f22c58457e703cd9
Created April 18, 2019 15:20
talos principle milton ascii
...',;;:cccccccc:;,..
..,;:cccc::::ccccclloooolc;'.
.',;:::;;;;:loodxk0kkxxkxxdocccc;;'..
.,;;;,,;:coxldKNWWWMMMMWNNWWNNKkdolcccc:,.
.',;;,',;lxo:...dXWMMMMMMMMNkloOXNNNX0koc:coo;.
..,;:;,,,:ldl' .kWMMMWXXNWMMMMXd..':d0XWWN0d:;lkd,
..,;;,,'':loc. lKMMMNl. .c0KNWNK: ..';lx00X0l,cxo,.
..''....'cooc. c0NMMX; .l0XWN0; ,ddx00occl:.
..'.. .':odc. .x0KKKkolcld000xc. .cxxxkkdl:,..
..''.. ;dxolc;' .lxx000kkxx00kc. .;looolllol:'..
@Juul
Juul / amazon_fire_2015_7_inc_lineageos_install.md
Last active June 23, 2024 17:51
How to install install LineageOS on a 2015 7" Amazon Fire tablet

This is a guide for getting LineageOS (an older and unofficial version) onto an Amazon Fire 2015 7" tablet (also known as the 5th generation 7" Amazon Fire or under the internal codename "ford").

NOTE: This guide was originally written before someone figured out how to unlock the bootloader. There is now a newer method. Here it is very briefly. The old guide can be found below.

Unlocked bootloader method

First unlock the bootloader using this guide.

Once you're booted into TWRP download the latest LineageOS 14 release for your device here.

@0xpizza
0xpizza / async_tcp_scan.py
Last active November 20, 2021 15:25
TCP Network scanner using asyncio for Python 3.7
#!/usr/bin/python3.7
import asyncio
import ipaddress
import re
import sys
MAX_NUMBER_WORKERS = 200
@JMalysiak
JMalysiak / facetags.py
Last active March 8, 2024 09:12
Import Picasa face tags into Digikam database
# This is a script to import face tags from Picasa into Digikam's SQLite database.
# First you need to export Picasa database into XML using this tool:
# https://sourceforge.net/projects/exportpicasa/
# Later you need to adjust this script to fit your needs and then just run it.
import xml.etree.ElementTree as ET
import sqlite3
# Adjust the values below:
XML_FILE_PATH = '/path/to/file.xml'
@samarthbhargav
samarthbhargav / CUDA Availability in Torch
Created September 24, 2018 10:00
One liner to test if cuda is available
python -c "import torch; print(torch.cuda.is_available())"
@Michaelvilleneuve
Michaelvilleneuve / i18n.test.js
Created August 8, 2018 10:14
Jest tests to check for missing translations, unused keys and incomplete translation files
/* eslint-disable */
import fr from 'config/locales/fr';
import en from 'config/locales/en';
import { exec } from 'child_process';
describe('i18n', () => {
test('Translations keys are the same for every language', () => {
const translationKeysEn = iterate(en, '', []);
const translationKeysFr = iterate(fr, '', []);
@egordorichev
egordorichev / bkp.p8
Created April 22, 2018 17:31
Rythm is Lava
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- main
-- todo
-- music
-- sfx
-- fx