Skip to content

Instantly share code, notes, and snippets.

View abougouffa's full-sized avatar
🐞
Chasing bugs

Abdelhak Bougouffa abougouffa

🐞
Chasing bugs
View GitHub Profile
@rougier
rougier / hl-block.el
Created January 5, 2025 16:47
Emacs / highlight logical block at point
;;; hl-block.el --- Highlight logical block at point -*- lexical-binding: t -*-
;; Copyright (C) 2025 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <[email protected]>
;; Package-Requires: ((emacs "27.1"))
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@bzgec
bzgec / cppcheck_misra_parse_pdf.py
Created May 21, 2023 08:58
Generate MISRA C guidelines (Dirs and Rules) from pdf for cppcheck
#!/usr/bin/python
"""
Generate MISRA C guidelines (Dirs and Rules) from pdf for cppcheck.
Arguments:
filename - MISRA pdf file
Example:
python cppcheck_misra_parse_pdf.py "/path/to/MISRA_C_2023.pdf"
----------------------------------------------------------------------------------------------------

Bitbake Cheatsheet

Verbose as possible

bitbake -vDDD your-recipe

List recipes

bitbake -s
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active March 16, 2025 17:09
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

#
# This is a little script to populate Firefox Sync with
# fake password records. Use it like so:
#
# $> pip install PyFxA syncclient cryptography
# $> python ./upload_fake_passwords.py 20
#
# It will prompt for your Firefox Account email address and
# password, generate and upload 20 fake password records, then
# sync down and print all password records stored in sync.
@hhromic
hhromic / wpe-yocto.md
Last active January 28, 2023 13:53
Building WPE with Yocto for Raspberry Pi Zero W

Repositories Cloning

BRANCH=master  # or 'rocko'
xargs -n 1 git clone -b $BRANCH <<'__EOF__'
git://git.yoctoproject.org/poky
git://git.openembedded.org/meta-openembedded
git://github.com/agherzan/meta-raspberrypi
git://github.com/webplatformforembedded/meta-wpe
__EOF__
@fetchTe
fetchTe / google-fu.md
Last active September 25, 2024 11:11
Google Fu

Google Fu

  • “Search Term”

    • This operator searches for the exact phrase within speech marks only. This is ideal when the phrase you are using to search is ambiguous and could be easily confused with something else, or when you’re not quite getting relevant enough results back.
    • ex: “Tinned Sandwiches”
      • This will search for only the finer tinned variety of the bread based snack, at the exclusion of all others.
  • OR

    • This self explanatory operator searches for a given search term OR an equivalent term. For instance, if you have an unhealthy fascination with the famous ‘Sheens’ you could search for:
  • ex: “Martin Sheen” OR “Charlie Sheen”
@wngreene
wngreene / bag_to_images.py
Last active January 14, 2025 05:58
Extract images from a rosbag.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Massachusetts Institute of Technology
"""Extract images from a rosbag.
"""
import os
import argparse
@kriswebdev
kriswebdev / novpn.sh
Last active March 6, 2025 13:47
novpn: Bypass VPN for specific apps [Linux / OpenVPN]
#!/bin/bash
# === INFO ===
# NoVPN
# Description: Bypass VPN tunnel for applications run through this tool.
VERSION="3.0.0"
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).
# This version is tested on Ubuntu 14.04 and 19.10 with bash.
# Main dependencies are automatically installed.
@tkhoa2711
tkhoa2711 / get-ip-address.el
Created March 9, 2016 02:47
Retrieve IP address using Emacs Lisp (on Windows and UNIX)
(defun get-ip-address (&optional dev)
"Get the IP-address for device DEV (default: eth0) of the current machine."
(let ((dev (if dev dev "eth0")))
(format-network-address (car (network-interface-info dev)) t)))